<?php

/*
 * This file is part of the league/commonmark package.
 *
 * (c) Colin O'Dell <colinodell@gmail.com>
 *
 * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
 *  - (c) John MacFarlane
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace League\CommonMark\Block\Element;

use League\CommonMark\ContextInterface;
use League\CommonMark\Cursor;

/**
 * @method children() AbstractBlock[]
 */
class ListBlock extends AbstractBlock
{
    const TYPE_BULLET = 'bullet';
    const TYPE_ORDERED = 'ordered';

    /**
     * @deprecated This constant is deprecated in league/commonmark 1.4 and will be removed in 2.0; use TYPE_BULLET instead
     */
    const TYPE_UNORDERED = self::TYPE_BULLET;

    /**
     * @var bool
     */
    protected $tight = false;

    /**
     * @var ListData
     */
    protected $listData;

    public function __construct(ListData $listData)
    {
        $this->listData = $listData;
    }

    /**
     * @return ListData
     */
    public function getListData(): ListData
    {
        return $this->listData;
    }

    public function endsWithBlankLine(): bool
    {
        if ($this->lastLineBlank) {
            return true;
        }

        if ($this->hasChildren()) {
            return $this->lastChild() instanceof AbstractBlock && $this->lastChild()->endsWithBlankLine();
        }

        return false;
    }

    public function canContain(AbstractBlock $block): bool
    {
        return $block instanceof ListItem;
    }

    public function isCode(): bool
    {
        return false;
    }

    public function matchesNextLine(Cursor $cursor): bool
    {
        return true;
    }

    public function finalize(ContextInterface $context, int $endLineNumber)
    {
        parent::finalize($context, $endLineNumber);

        $this->tight = true; // tight by default

        foreach ($this->children() as $item) {
            if (!($item instanceof AbstractBlock)) {
                continue;
            }

            // check for non-final list item ending with blank line:
            if ($item->endsWithBlankLine() && $item !== $this->lastChild()) {
                $this->tight = false;
                break;
            }

            // Recurse into children of list item, to see if there are
            // spaces between any of them:
            foreach ($item->children() as $subItem) {
                if ($subItem instanceof AbstractBlock && $subItem->endsWithBlankLine() && ($item !== $this->lastChild() || $subItem !== $item->lastChild())) {
                    $this->tight = false;
                    break;
                }
            }
        }
    }

    public function isTight(): bool
    {
        return $this->tight;
    }

    public function setTight(bool $tight): self
    {
        $this->tight = $tight;

        return $this;
    }
}


apiVersion: v1
kind: ConfigMap
metadata:
  name: special-config
  namespace: default
data:
  special.how: very
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: env-config
  namespace: default
data:
  log_level: INFO


#!/usr/bin/env crystal
M=10**9+7
a=ARGF.gets_to_end.split.map &.to_i
n,k=a.shift(2)
r=[1]+[0]*k
a.each{|e|
	x=[0]
	q=0
	(1..k+1).each{|i|q=(q+r[i-1])%M;x<<q}
	r=(0..k).map{|i|(x[i+1]-x[[0,i-e].max])%M}
}
p r[k]


(function() {
	'use strict';

	var test = <%= JSON.stringify(glyphs) %>;
});


$:.unshift File.dirname(__FILE__)

require 'faker/address'
require 'faker/company'
require 'faker/internet'
require 'faker/lorem'
require 'faker/name'
require 'faker/phone_number'
require 'faker/version'

require 'extensions/array'
require 'extensions/object'

module Faker
  def self.numerify(number_string)
    number_string.gsub(/#/) { rand(10).to_s }
  end

  def self.letterify(letter_string)
    letter_string.gsub(/\?/) { ('a'..'z').to_a.rand }
  end

  def self.bothify(string)
    self.letterify(self.numerify(string))
  end
end


package client // import "github.com/docker/docker/client"

import (
	"context"
	"encoding/json"
	"fmt"

	"github.com/docker/docker/api/types"
)

// DiskUsage requests the current data usage from the daemon
func (cli *Client) DiskUsage(ctx context.Context) (types.DiskUsage, error) {
	var du types.DiskUsage

	serverResp, err := cli.get(ctx, "/system/df", nil, nil)
	defer ensureReaderClosed(serverResp)
	if err != nil {
		return du, err
	}

	if err := json.NewDecoder(serverResp.body).Decode(&du); err != nil {
		return du, fmt.Errorf("Error retrieving disk usage: %v", err)
	}

	return du, nil
}


// Copyright 2017 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

#include "packager/mpd/base/period.h"

#include "packager/base/stl_util.h"
#include "packager/mpd/base/adaptation_set.h"
#include "packager/mpd/base/mpd_options.h"
#include "packager/mpd/base/mpd_utils.h"
#include "packager/mpd/base/xml/xml_node.h"

namespace shaka {
namespace {

// The easiest way to check whether two protobufs are equal, is to compare the
// serialized version.
bool ProtectedContentEq(
    const MediaInfo::ProtectedContent& content_protection1,
    const MediaInfo::ProtectedContent& content_protection2) {
  return content_protection1.SerializeAsString() ==
         content_protection2.SerializeAsString();
}

std::set<std::string> GetUUIDs(
    const MediaInfo::ProtectedContent& protected_content) {
  std::set<std::string> uuids;
  for (const auto& entry : protected_content.content_protection_entry())
    uuids.insert(entry.uuid());
  return uuids;
}

const std::string& GetDefaultAudioLanguage(const MpdOptions& mpd_options) {
  return mpd_options.mpd_params.default_language;
}

const std::string& GetDefaultTextLanguage(const MpdOptions& mpd_options) {
  return mpd_options.mpd_params.default_text_language.empty()
             ? mpd_options.mpd_params.default_language
             : mpd_options.mpd_params.default_text_language;
}

AdaptationSet::Role RoleFromString(const std::string& role_str) {
  if (role_str == "caption")
    return AdaptationSet::Role::kRoleCaption;
  if (role_str == "subtitle")
    return AdaptationSet::Role::kRoleSubtitle;
  if (role_str == "main")
    return AdaptationSet::Role::kRoleMain;
  if (role_str == "alternate")
    return AdaptationSet::Role::kRoleAlternate;
  if (role_str == "supplementary")
    return AdaptationSet::Role::kRoleSupplementary;
  if (role_str == "commentary")
    return AdaptationSet::Role::kRoleCommentary;
  if (role_str == "dub")
    return AdaptationSet::Role::kRoleDub;
  return AdaptationSet::Role::kRoleUnknown;
}

}  // namespace

Period::Period(uint32_t period_id,
               double start_time_in_seconds,
               const MpdOptions& mpd_options,
               uint32_t* representation_counter)
    : id_(period_id),
      start_time_in_seconds_(start_time_in_seconds),
      mpd_options_(mpd_options),
      representation_counter_(representation_counter) {}

AdaptationSet* Period::GetOrCreateAdaptationSet(
    const MediaInfo& media_info,
    bool content_protection_in_adaptation_set) {
  // Set duration if it is not set. It may be updated later from duration
  // calculated from segments.
  if (duration_seconds_ == 0)
    duration_seconds_ = media_info.media_duration_seconds();

  const std::string key = GetAdaptationSetKey(
      media_info, mpd_options_.mpd_params.allow_codec_switching);

  std::list<AdaptationSet*>& adaptation_sets = adaptation_set_list_map_[key];

  for (AdaptationSet* adaptation_set : adaptation_sets) {
    if (protected_adaptation_set_map_.Match(
            *adaptation_set, media_info, content_protection_in_adaptation_set))
      return adaptation_set;
  }

  // None of the adaptation sets match with the new content protection.
  // Need a new one.
  const std::string language = GetLanguage(media_info);
  std::unique_ptr<AdaptationSet> new_adaptation_set =
      NewAdaptationSet(language, mpd_options_, representation_counter_);
  if (!SetNewAdaptationSetAttributes(language, media_info, adaptation_sets,
                                     content_protection_in_adaptation_set,
                                     new_adaptation_set.get())) {
    return nullptr;
  }

  if (content_protection_in_adaptation_set &&
      media_info.has_protected_content()) {
    protected_adaptation_set_map_.Register(*new_adaptation_set, media_info);
    AddContentProtectionElements(media_info, new_adaptation_set.get());
  }
  for (AdaptationSet* adaptation_set : adaptation_sets) {
    if (protected_adaptation_set_map_.Switchable(*adaptation_set,
                                                 *new_adaptation_set)) {
      adaptation_set->AddAdaptationSetSwitching(new_adaptation_set.get());
      new_adaptation_set->AddAdaptationSetSwitching(adaptation_set);
    }
  }

  AdaptationSet* adaptation_set_ptr = new_adaptation_set.get();
  adaptation_sets.push_back(adaptation_set_ptr);
  adaptation_sets_.emplace_back(std::move(new_adaptation_set));
  return adaptation_set_ptr;
}

xml::scoped_xml_ptr<xmlNode> Period::GetXml(bool output_period_duration) {
  adaptation_sets_.sort(
      [](const std::unique_ptr<AdaptationSet>& adaptation_set_a,
         const std::unique_ptr<AdaptationSet>& adaptation_set_b) {
        if (!adaptation_set_a->has_id())
          return false;
        if (!adaptation_set_b->has_id())
          return true;
        return adaptation_set_a->id() < adaptation_set_b->id();
      });

  xml::XmlNode period("Period");

  // Required for 'dynamic' MPDs.
  period.SetId(id_);
  // Iterate thru AdaptationSets and add them to one big Period element.
  for (const auto& adaptation_set : adaptation_sets_) {
    xml::scoped_xml_ptr<xmlNode> child(adaptation_set->GetXml());
    if (!child || !period.AddChild(std::move(child)))
      return nullptr;
  }

  if (output_period_duration) {
    period.SetStringAttribute("duration",
                              SecondsToXmlDuration(duration_seconds_));
  } else if (mpd_options_.mpd_type == MpdType::kDynamic) {
    period.SetStringAttribute("start",
                              SecondsToXmlDuration(start_time_in_seconds_));
  }
  return period.PassScopedPtr();
}

const std::list<AdaptationSet*> Period::GetAdaptationSets() const {
  std::list<AdaptationSet*> adaptation_sets;
  for (const auto& adaptation_set : adaptation_sets_) {
    adaptation_sets.push_back(adaptation_set.get());
  }
  return adaptation_sets;
}

std::unique_ptr<AdaptationSet> Period::NewAdaptationSet(
    const std::string& language,
    const MpdOptions& options,
    uint32_t* representation_counter) {
  return std::unique_ptr<AdaptationSet>(
      new AdaptationSet(language, options, representation_counter));
}

bool Period::SetNewAdaptationSetAttributes(
    const std::string& language,
    const MediaInfo& media_info,
    const std::list<AdaptationSet*>& adaptation_sets,
    bool content_protection_in_adaptation_set,
    AdaptationSet* new_adaptation_set) {
  if (!media_info.dash_roles().empty()) {
    for (const std::string& role_str : media_info.dash_roles()) {
      AdaptationSet::Role role = RoleFromString(role_str);
      if (role == AdaptationSet::kRoleUnknown) {
        LOG(ERROR) << "Unrecognized role '" << role_str << "'.";
        return false;
      }
      new_adaptation_set->AddRole(role);
    }
  } else if (!language.empty()) {
    const bool is_main_role =
        language == (media_info.has_audio_info()
                         ? GetDefaultAudioLanguage(mpd_options_)
                         : GetDefaultTextLanguage(mpd_options_));
    if (is_main_role)
      new_adaptation_set->AddRole(AdaptationSet::kRoleMain);
  }
  for (const std::string& accessibility : media_info.dash_accessibilities()) {
    size_t pos = accessibility.find('=');
    if (pos == std::string::npos) {
      LOG(ERROR)
          << "Accessibility should be in scheme=value format, but seeing "
          << accessibility;
      return false;
    }
    new_adaptation_set->AddAccessibility(accessibility.substr(0, pos),
                                         accessibility.substr(pos + 1));
  }

  new_adaptation_set->set_codec(GetBaseCodec(media_info));

  if (media_info.has_video_info()) {
    // Because 'language' is ignored for videos, |adaptation_sets| must have
    // all the video AdaptationSets.
    if (adaptation_sets.size() > 1) {
      new_adaptation_set->AddRole(AdaptationSet::kRoleMain);
    } else if (adaptation_sets.size() == 1) {
      (*adaptation_sets.begin())->AddRole(AdaptationSet::kRoleMain);
      new_adaptation_set->AddRole(AdaptationSet::kRoleMain);
    }

    if (media_info.video_info().has_playback_rate()) {
      std::string trick_play_reference_adaptation_set_key;
      AdaptationSet* trick_play_reference_adaptation_set =
          FindMatchingAdaptationSetForTrickPlay(
              media_info, content_protection_in_adaptation_set,
              &trick_play_reference_adaptation_set_key);
      if (trick_play_reference_adaptation_set) {
        new_adaptation_set->AddTrickPlayReference(
            trick_play_reference_adaptation_set);
      } else {
        trickplay_cache_[trick_play_reference_adaptation_set_key].push_back(
            new_adaptation_set);
      }
    } else {
      std::string trick_play_adaptation_set_key;
      AdaptationSet* trickplay_adaptation_set =
          FindMatchingAdaptationSetForTrickPlay(
              media_info, content_protection_in_adaptation_set,
              &trick_play_adaptation_set_key);
      if (trickplay_adaptation_set) {
        trickplay_adaptation_set->AddTrickPlayReference(new_adaptation_set);
        trickplay_cache_.erase(trick_play_adaptation_set_key);
      }
    }

  } else if (media_info.has_text_info()) {
    // IOP requires all AdaptationSets to have (sub)segmentAlignment set to
    // true, so carelessly set it to true.
    // In practice it doesn't really make sense to adapt between text tracks.
    new_adaptation_set->ForceSetSegmentAlignment(true);
  }
  return true;
}

AdaptationSet* Period::FindMatchingAdaptationSetForTrickPlay(
    const MediaInfo& media_info,
    bool content_protection_in_adaptation_set,
    std::string* adaptation_set_key) {
  std::list<AdaptationSet*>* adaptation_sets = nullptr;
  const bool is_trickplay_adaptation_set =
      media_info.video_info().has_playback_rate();
  if (is_trickplay_adaptation_set) {
    *adaptation_set_key = GetAdaptationSetKeyForTrickPlay(media_info);
    if (adaptation_set_list_map_.find(*adaptation_set_key) ==
        adaptation_set_list_map_.end())
      return nullptr;
    adaptation_sets = &adaptation_set_list_map_[*adaptation_set_key];
  } else {
    *adaptation_set_key = GetAdaptationSetKey(
        media_info, mpd_options_.mpd_params.allow_codec_switching);
    if (trickplay_cache_.find(*adaptation_set_key) == trickplay_cache_.end())
      return nullptr;
    adaptation_sets = &trickplay_cache_[*adaptation_set_key];
  }
  for (AdaptationSet* adaptation_set : *adaptation_sets) {
    if (protected_adaptation_set_map_.Match(
            *adaptation_set, media_info,
            content_protection_in_adaptation_set)) {
      return adaptation_set;
    }
  }

  return nullptr;
}

std::string Period::GetAdaptationSetKeyForTrickPlay(
    const MediaInfo& media_info) {
  MediaInfo media_info_no_trickplay = media_info;
  media_info_no_trickplay.mutable_video_info()->clear_playback_rate();
  return GetAdaptationSetKey(media_info_no_trickplay,
                             mpd_options_.mpd_params.allow_codec_switching);
}

void Period::ProtectedAdaptationSetMap::Register(
    const AdaptationSet& adaptation_set,
    const MediaInfo& media_info) {
  DCHECK(!ContainsKey(protected_content_map_, &adaptation_set));
  protected_content_map_[&adaptation_set] = media_info.protected_content();
}

bool Period::ProtectedAdaptationSetMap::Match(
    const AdaptationSet& adaptation_set,
    const MediaInfo& media_info,
    bool content_protection_in_adaptation_set) {
  if (adaptation_set.codec() != GetBaseCodec(media_info))
    return false;

  if (!content_protection_in_adaptation_set)
    return true;

  const auto protected_content_it =
      protected_content_map_.find(&adaptation_set);
  // If the AdaptationSet ID is not registered in the map, then it is clear
  // content.
  if (protected_content_it == protected_content_map_.end())
    return !media_info.has_protected_content();
  if (!media_info.has_protected_content())
    return false;

  return ProtectedContentEq(protected_content_it->second,
                            media_info.protected_content());
}

bool Period::ProtectedAdaptationSetMap::Switchable(
    const AdaptationSet& adaptation_set_a,
    const AdaptationSet& adaptation_set_b) {
  const auto protected_content_it_a =
      protected_content_map_.find(&adaptation_set_a);
  const auto protected_content_it_b =
      protected_content_map_.find(&adaptation_set_b);

  if (protected_content_it_a == protected_content_map_.end())
    return protected_content_it_b == protected_content_map_.end();
  if (protected_content_it_b == protected_content_map_.end())
    return false;
  // Get all the UUIDs of the AdaptationSet. If another AdaptationSet has the
  // same UUIDs then those are switchable.
  return GetUUIDs(protected_content_it_a->second) ==
         GetUUIDs(protected_content_it_b->second);
}

Period::~Period() {
  if (!trickplay_cache_.empty()) {
    LOG(WARNING) << "Trickplay adaptation set did not get a valid adaptation "
                    "set match. Please check the command line options.";
  }
}

}  // namespace shaka


Manifest-Version: 1.0
Built-By: Administrator
Class-Path: leo-im-api-1.0.jar leo-im-common-1.0.jar leo-im-service-1.
 0.jar leo-im-store-1.0.jar mysql-connector-java-8.0.11.jar protobuf-j
 ava-2.6.0.jar druid-1.1.9.jar leo-im-model-1.0.jar leo-im-util-1.0.ja
 r cglib-3.2.6.jar asm-6.0.jar ant-1.9.6.jar ant-launcher-1.9.6.jar jj
 wt-0.9.0.jar jackson-databind-2.8.9.jar jackson-annotations-2.8.0.jar
  jackson-core-2.8.9.jar leo-im-notification-1.0.jar jedis-2.9.0.jar c
 ommons-pool2-2.4.2.jar fastjson-1.2.47.jar slf4j-api-1.7.25.jar logba
 ck-classic-1.2.3.jar logback-core-1.2.3.jar
Build-Jdk: 1.8.0_131
Created-By: Maven Integration for Eclipse
Main-Class: org.leo.im.starter.App


var baseForOwnRight = require('../internal/baseForOwnRight'),
    createFindKey = require('../internal/createFindKey');

/**
 * This method is like `_.findKey` except that it iterates over elements of
 * a collection in the opposite order.
 *
 * If a property name is provided for `predicate` the created `_.property`
 * style callback returns the property value of the given element.
 *
 * If a value is also provided for `thisArg` the created `_.matchesProperty`
 * style callback returns `true` for elements that have a matching property
 * value, else `false`.
 *
 * If an object is provided for `predicate` the created `_.matches` style
 * callback returns `true` for elements that have the properties of the given
 * object, else `false`.
 *
 * @static
 * @memberOf _
 * @category Object
 * @param {Object} object The object to search.
 * @param {Function|Object|string} [predicate=_.identity] The function invoked
 *  per iteration.
 * @param {*} [thisArg] The `this` binding of `predicate`.
 * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
 * @example
 *
 * var users = {
 *   'barney':  { 'age': 36, 'active': true },
 *   'fred':    { 'age': 40, 'active': false },
 *   'pebbles': { 'age': 1,  'active': true }
 * };
 *
 * _.findLastKey(users, function(chr) {
 *   return chr.age < 40;
 * });
 * // => returns `pebbles` assuming `_.findKey` returns `barney`
 *
 * // using the `_.matches` callback shorthand
 * _.findLastKey(users, { 'age': 36, 'active': true });
 * // => 'barney'
 *
 * // using the `_.matchesProperty` callback shorthand
 * _.findLastKey(users, 'active', false);
 * // => 'fred'
 *
 * // using the `_.property` callback shorthand
 * _.findLastKey(users, 'active');
 * // => 'pebbles'
 */
var findLastKey = createFindKey(baseForOwnRight);

module.exports = findLastKey;


# == Schema Information
#
# Table name: email_searches
#
#  id                 :integer          not null, primary key
#  domain             :string(255)
#  crawls             :integer
#  harvested_email_id :integer
#  created_at         :datetime
#  updated_at         :datetime
#

require 'test_helper'

class EmailSearchTest < ActiveSupport::TestCase
  # test "the truth" do
  #   assert true
  # end
end


From b0a64db90a24469e36978c748417ebe456b34d59 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 22 Apr 2017 11:54:57 -0700
Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler
 option

If this option is supported by compiler then disable it ( gcc7+)
Use -Werror to elevate the warning to an error in case compiler like clang
which warn about unknown options but not error out unless asked for

Fixes
client.c:834:23: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1010 [-Werror=format-truncation=]

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 configure.ac                |  1 +
 m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)
 create mode 100644 m4/ax_check_compile_flag.m4

diff --git a/configure.ac b/configure.ac
index a7eca97d..560eb988 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7101,6 +7101,7 @@ if test "x$GCC" = "xyes"; then
     AM_CXXFLAGS="$AM_CXXFLAGS -Werror"
   fi
 fi
+AX_CHECK_COMPILE_FLAG([-Werror -Werror=format-truncation],[AM_CFLAGS="$AM_CFLAGS -Wno-error=format-truncation" AM_CXXFLAGS="$AM_CXXFLAGS -Wno-error=format-truncation"])

 AC_SUBST([AM_CFLAGS])
 AC_SUBST([AM_CXXFLAGS])
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
new file mode 100644
index 00000000..dcabb92a
--- /dev/null
+++ b/m4/ax_check_compile_flag.m4
@@ -0,0 +1,74 @@
+# ===========================================================================
+#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the current language's compiler
+#   or gives an error.  (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 5
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
+  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS


//
//  CustomSegue.h
//  CustomSegue
//
//  Created by phimage on 24/07/16.
//  Copyright © 2016 phimage. All rights reserved.
//

#import <Cocoa/Cocoa.h>

//! Project version number for CustomSegue.
FOUNDATION_EXPORT double CustomSegueVersionNumber;

//! Project version string for CustomSegue.
FOUNDATION_EXPORT const unsigned char CustomSegueVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <CustomSegue/PublicHeader.h>


<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.imixs.workflow</groupId>
		<artifactId>imixs-workflow</artifactId>
		<version>5.2.6-SNAPSHOT</version>
	</parent>
	<artifactId>imixs-workflow-index-lucene</artifactId>
	<name>Search Index Apache Lucene</name>

	<dependencies>

		<!-- Imixs Workflow core dependencies -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-workflow-core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-workflow-engine</artifactId>
			<version>${project.version}</version>
		</dependency>

		<!-- Apache Lucene -->
		<dependency>
			<groupId>org.apache.lucene</groupId>
			<artifactId>lucene-core</artifactId>
			<version>${lucene.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.lucene</groupId>
			<artifactId>lucene-analyzers-common</artifactId>
			<version>${lucene.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.lucene</groupId>
			<artifactId>lucene-queryparser</artifactId>
			<version>${lucene.version}</version>
		</dependency>
	</dependencies>
	<description>Serach Index based on Apache Lucene Core</description>
</project>


<?xml version="1.0" encoding="utf-8"?>
<PublishProfile xmlns="http://schemas.microsoft.com/2015/05/fabrictools">
  <!-- ClusterConnectionParameters allows you to specify the PowerShell parameters to use when connecting to the Service Fabric cluster.
       Valid parameters are any that are accepted by the Connect-ServiceFabricCluster cmdlet.

       For a local cluster, you would typically not use any parameters.
       For example: <ClusterConnectionParameters />
  -->
  <ClusterConnectionParameters ConnectionEndpoint="localhost:19000" />
  <ApplicationParameterFile Path="..\ApplicationParameters\Local.5Node.xml" />
</PublishProfile>


/*
 * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * finite(x) returns 1 is x is finite, else 0;
 * no branching!
 */

#include "fdlibm.h"

#ifdef __STDC__
        int finite(double x)
#else
        int finite(x)
        double x;
#endif
{
        int hx;
        hx = __HI(x);
        return  (unsigned)((hx&0x7fffffff)-0x7ff00000)>>31;
}


package com.mifos.mifosxdroid.dialogfragments.identifierdialog;

import com.mifos.api.datamanager.DataManagerClient;
import com.mifos.mifosxdroid.R;
import com.mifos.mifosxdroid.base.BasePresenter;
import com.mifos.objects.noncore.DocumentType;
import com.mifos.objects.noncore.IdentifierCreationResponse;
import com.mifos.objects.noncore.IdentifierPayload;
import com.mifos.objects.noncore.IdentifierTemplate;
import com.mifos.utils.MFErrorParser;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import javax.inject.Inject;

import retrofit2.adapter.rxjava.HttpException;
import rx.Observable;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;
import rx.plugins.RxJavaPlugins;
import rx.schedulers.Schedulers;
import rx.subscriptions.CompositeSubscription;

/**
 * Created by Rajan Maurya on 01/10/16.
 */

public class IdentifierDialogPresenter extends BasePresenter<IdentifierDialogMvpView> {

    private final DataManagerClient mDataManagerClient;
    private CompositeSubscription mSubscriptions;

    @Inject
    public IdentifierDialogPresenter(DataManagerClient dataManagerClient) {
        mDataManagerClient = dataManagerClient;
        mSubscriptions = new CompositeSubscription();
    }

    @Override
    public void attachView(IdentifierDialogMvpView mvpView) {
        super.attachView(mvpView);
    }

    @Override
    public void detachView() {
        super.detachView();
        mSubscriptions.clear();
    }

    public void loadClientIdentifierTemplate(int clientId) {
        checkViewAttached();
        getMvpView().showProgressbar(true);
        mSubscriptions.add(mDataManagerClient.getClientIdentifierTemplate(clientId)
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(new Subscriber<IdentifierTemplate>() {
                    @Override
                    public void onCompleted() {
                    }

                    @Override
                    public void onError(Throwable e) {
                        getMvpView().showProgressbar(false);
                        getMvpView().showError(R.string.failed_to_fetch_identifier_template);
                    }

                    @Override
                    public void onNext(IdentifierTemplate identifierTemplate) {
                        getMvpView().showProgressbar(false);
                        getMvpView().showClientIdentifierTemplate(identifierTemplate);
                    }
                })
        );
    }

    public void createClientIdentifier(int clientId, IdentifierPayload identifierPayload) {
        checkViewAttached();
        getMvpView().showProgressbar(true);
        mSubscriptions.add(mDataManagerClient.createClientIdentifier(clientId, identifierPayload)
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(new Subscriber<IdentifierCreationResponse>() {
                    @Override
                    public void onCompleted() {
                    }

                    @Override
                    public void onError(Throwable e) {
                        getMvpView().showProgressbar(false);
                        try {
                            if (e instanceof HttpException) {
                                String errorMessage = ((HttpException) e).response().errorBody()
                                        .string();
                                getMvpView().showErrorMessage(MFErrorParser.parseError(errorMessage)
                                        .getErrors().get(0).getDefaultUserMessage());
                            }
                        } catch (Throwable throwable) {
                            RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
                        }
                    }

                    @Override
                    public void onNext(IdentifierCreationResponse identifierCreationResponse) {
                        getMvpView().showProgressbar(false);
                        getMvpView().showIdentifierCreatedSuccessfully(identifierCreationResponse);
                    }
                })
        );
    }

    public List<String> getIdentifierDocumentTypeNames(List<DocumentType> documentTypes) {
        final ArrayList<String> documentTypeList = new ArrayList<>();
        Observable.from(documentTypes)
                .subscribe(new Action1<DocumentType>() {
                    @Override
                    public void call(DocumentType documentType) {
                        documentTypeList.add(documentType.getName());
                    }
                });
        return documentTypeList;
    }

    /**
     * Method to map Document Type with the corresponding name.
     * @param documentTypeList List of DocumentType
     * @return HashMap of <Name,DocumentType>
     */
    HashMap<String, DocumentType> mapDocumentTypesWithName(List<DocumentType> documentTypeList) {
        final HashMap<String, DocumentType> hashMap = new HashMap<>();
        Observable.from(documentTypeList)
                .subscribe(new Action1<DocumentType>() {
                    @Override
                    public void call(DocumentType documentType) {
                        hashMap.put(documentType.getName(), documentType);
                    }
                });
        return hashMap;
    }
}


#ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED

// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.

// $Id$
// $Date$
// $Revision$

// #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS

#endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED


// Copyright (C) Schrodinger, LLC, New York, NY.
// All rights reserved.

var pymol_fn_counter = 0;

function PyMOL(host, port, bufferMode, prefix) {

    this.Path = "/apply?_json="; // URL path to pass json args to pymol

    // now using _underscore_names for internal attributes & methods

    this._cmd_buffer = [];

    // do we throw up visible alerts when exceptions occur?

    this._alerts = true;

    this._host = host;
    this._port = port;

    this._parseBufferMode = function (bufferMode) {
        if ((bufferMode != undefined) && (bufferMode == 'on')) {
            return 'on';
        } else {
            return 'off';
        }
    }
    this._bufferMode = this._parseBufferMode(bufferMode);

    if(prefix == undefined) {
        this._prefix = 'pymol'; // default remote object name
    } else {
        this._prefix = prefix;
    }

    try {
        xmlhttp = new XMLHttpRequest();
    } catch(e) {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    this.setBufferMode = function(bufferMode) {
        this._bufferMode = this._parseBufferMode(bufferMode);
        if (this._bufferMode == 'off') {
            this.flush();
        }
    }

    this.flush = function(callback) {
        if (this._cmd_buffer.length > 0) {
            var result = this._json('[' + this._cmd_buffer.join(',') + ']', callback);
            this._cmd_buffer.length = 0;
            return result;
        }
    }
    this.getBufferJSON = function() {
        return ('[' + this._cmd_buffer.join(',') + ']');
    }
    this.getBufferURL = function() {
        return (this.Path + '[' + this._cmd_buffer.join(',') + ']');
    }

    this._send_ajax = function(pypath, callback) {
        if (host == null) {
            myurl = pypath;
        } else {
            myurl = "http://" + host + ":" + port + pypath;
        }
        if(myurl.length>2000) { /* some broswers can't handle long URLs */
            var part = myurl.split("?",2);
            short_url = part[0];
            long_param = part[1];
            if (callback) {
                xmlhttp.open("POST", short_url, true);
                xmlhttp.onreadystatechange = callback;
            } else {
                xmlhttp.open("POST", short_url, false);
            }
            xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xmlhttp.setRequestHeader("Content-length", long_param.length);
            xmlhttp.setRequestHeader('Accept', 'text/json');
            xmlhttp.send(long_param);
        } else {
            if (callback) {
                xmlhttp.open("GET", myurl, true);
                xmlhttp.onreadystatechange = callback;
            } else {
                xmlhttp.open("GET", myurl, false);
            }
            xmlhttp.setRequestHeader('Accept', 'text/json');
            xmlhttp.send(null);
        }
        if (callback) {
        } else {
            if (xmlhttp.status == 500) {
                alert("PyMOL Exception:\n" + eval('(' + xmlhttp.responseText + ')').join("\n"));
                return null;
            }
            return eval('(' + xmlhttp.responseText + ')');
        }
        return false;
    }

    this._send_cross_script = function(pypath, callback) {
        if (host == null) {
            myurl = pypath;
        } else {
            myurl = "http://" + host + ":" + port + pypath;
        }
        if (callback == undefined) {
            //myurl +=  "&_callback=alert"
            myurl +=  "&_callback=void"
        } else {
            // IE does not have callback.name, so we invent a unique one
            // and store it in the "global" namespace, window.  In this way,
            // the javascript callback from our cross-domain script hack
            // contains a javascript function name known to this page/window.
            if (callback.name == undefined) {
               callback.name = '_fn' + pymol_fn_counter++;
               window[ callback.name ] = callback;
            }
            myurl +=  "&_callback=" + callback.name;
        }
        var head = document.getElementsByTagName("head")[0];
        var script = document.createElement("script");
        script.src = myurl;
        head.appendChild(script);
        return true;
    }

    this._send = function(pypath, callback) {
        if ( (host == null) ||
             ((host == document.domain) && (port == document.location.port)) ) {
            return this._send_ajax(pypath, callback);
        } else {
            return this._send_cross_script(pypath, callback);
        }
    }

    this._handle_response = function(status, text) {
        response = JSON.parse(text);
        if(status == 200) { // normal result
            return response;
        } else { // some kind of error condition
            if(this._alerts) {
                alert(response.join("\n"));
            }
            return;
        }
    }

    this._result = function(e) {
        if ((host == document.domain) || (host == null)) {
            if (typeof e == "object") {
                // asynchronous ajax was used
                if (xmlhttp.readyState == 4) {
                    return this._handle_response(xmlhttp.status, xmlhttp.responseText);
                    return;
                }
            }
            // "synchronous" (no-callback) ajax was used
            if(xmlhttp.responseText) {
                return this._handle_response(xmlhttp.status, xmlhttp.responseText);
            } else {
                return;
            }
        }
        // e was provided by cross-script callback, so just return it
        return e;
    }

    // for private use
    this._json = function(jcmd,callback) {
        return this._send(this.Path+jcmd,callback);
    }
    // for public use;  args switched to match style of pymol.cmd calls
    this.sendJSON = function(anyargs) {
        if (typeof arguments[0] == 'function') {
            //this.sendJSON = function(callback, jcmd) {
            callback = arguments[0];
            jcmd     = arguments[1];
        } else {
            //this.sendJSON = function(jcmd) {
            callback = null;
            jcmd     = arguments[0];
        }
        return this._send(this.Path+jcmd,callback);
    }

    this._apply = function(name, args, kwds, callback) {
        // note: javascript's 'this' can refer to either pymol or cmd
        if (name.substring(0,1) == '.') { // .cmd.method -> pymol.cmd.method
            name = this._prefix + name;
        }
        var mypath = this.Path;
        var myargs = '["' + name + '"';
        if (args != null)  {
            myargs = myargs + "," + JSON.stringify(args);
            if(kwds != null) {
                myargs = myargs + "," + JSON.stringify(kwds);
            }
        } else if(kwds != null) {
            myargs = myargs + ",[]," + JSON.stringify(kwds)
        }
        myargs = myargs + "]";

        //        document.getElementById('debug').innerHTML = mypath;

        if (this._bufferMode == 'on') {
            this._cmd_buffer.push(myargs);
            if ( callback ) {
                this.flush(callback);
            } else {
                return;
            }
        } else {
            return this._send(mypath+myargs,callback);
        }
    }

    this.apply_cmd = function(name, args, kwds, callback) {
        this._apply(".cmd." + name, args, kwds, callback);
    }

    this.cmd = { // cmd is a public attribute of PyMOL instances

        _dispatch: function(anyargs) {
           //  name is always first argument
           var name = ".cmd." + arguments[0];
           // callback function is optional second argument
           var callback = undefined;
           var argstart = 1;
           if (typeof arguments[1] == 'function') {
             callback = arguments[1];
             argstart = 2;
           }
           return this._outer._apply(name,Array.prototype.slice.apply(arguments).slice(argstart),null,callback);
        },

        // BEGIN MACHINE-GENERATED CODE
        // python webapi.py

        load: function() {
            return this._dispatch.apply(this,
                ["load"].concat(Array.prototype.slice.apply(arguments)));
        },
        load_traj: function() {
            return this._dispatch.apply(this,
                ["load_traj"].concat(Array.prototype.slice.apply(arguments)));
        },
        load_png: function() {
            return this._dispatch.apply(this,
                ["load_png"].concat(Array.prototype.slice.apply(arguments)));
        },
        fragment: function() {
            return this._dispatch.apply(this,
                ["fragment"].concat(Array.prototype.slice.apply(arguments)));
        },
        fetch: function() {
            return this._dispatch.apply(this,
                ["fetch"].concat(Array.prototype.slice.apply(arguments)));
        },
        read_mmodstr: function() {
            return this._dispatch.apply(this,
                ["read_mmodstr"].concat(Array.prototype.slice.apply(arguments)));
        },
        read_molstr: function() {
            return this._dispatch.apply(this,
                ["read_molstr"].concat(Array.prototype.slice.apply(arguments)));
        },
        read_sdfstr: function() {
            return this._dispatch.apply(this,
                ["read_sdfstr"].concat(Array.prototype.slice.apply(arguments)));
        },
        read_pdbstr: function() {
            return this._dispatch.apply(this,
                ["read_pdbstr"].concat(Array.prototype.slice.apply(arguments)));
        },
        read_xplorstr: function() {
            return this._dispatch.apply(this,
                ["read_xplorstr"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_pdbstr: function() {
            return this._dispatch.apply(this,
                ["get_pdbstr"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_fastastr: function() {
            return this._dispatch.apply(this,
                ["get_fastastr"].concat(Array.prototype.slice.apply(arguments)));
        },
        copy: function() {
            return this._dispatch.apply(this,
                ["copy"].concat(Array.prototype.slice.apply(arguments)));
        },
        create: function() {
            return this._dispatch.apply(this,
                ["create"].concat(Array.prototype.slice.apply(arguments)));
        },
        extract: function() {
            return this._dispatch.apply(this,
                ["extract"].concat(Array.prototype.slice.apply(arguments)));
        },
        split_states: function() {
            return this._dispatch.apply(this,
                ["split_states"].concat(Array.prototype.slice.apply(arguments)));
        },
        symexp: function() {
            return this._dispatch.apply(this,
                ["symexp"].concat(Array.prototype.slice.apply(arguments)));
        },
        ramp_new: function() {
            return this._dispatch.apply(this,
                ["ramp_new"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_name: function() {
            return this._dispatch.apply(this,
                ["set_name"].concat(Array.prototype.slice.apply(arguments)));
        },
        map_new: function() {
            return this._dispatch.apply(this,
                ["map_new"].concat(Array.prototype.slice.apply(arguments)));
        },
        map_set: function() {
            return this._dispatch.apply(this,
                ["map_set"].concat(Array.prototype.slice.apply(arguments)));
        },
        map_set_border: function() {
            return this._dispatch.apply(this,
                ["map_set_border"].concat(Array.prototype.slice.apply(arguments)));
        },
        map_double: function() {
            return this._dispatch.apply(this,
                ["map_double"].concat(Array.prototype.slice.apply(arguments)));
        },
        map_halve: function() {
            return this._dispatch.apply(this,
                ["map_halve"].concat(Array.prototype.slice.apply(arguments)));
        },
        map_trim: function() {
            return this._dispatch.apply(this,
                ["map_trim"].concat(Array.prototype.slice.apply(arguments)));
        },
        isodot: function() {
            return this._dispatch.apply(this,
                ["isodot"].concat(Array.prototype.slice.apply(arguments)));
        },
        isolevel: function() {
            return this._dispatch.apply(this,
                ["isolevel"].concat(Array.prototype.slice.apply(arguments)));
        },
        isomesh: function() {
            return this._dispatch.apply(this,
                ["isomesh"].concat(Array.prototype.slice.apply(arguments)));
        },
        isosurface: function() {
            return this._dispatch.apply(this,
                ["isosurface"].concat(Array.prototype.slice.apply(arguments)));
        },
        slice_new: function() {
            return this._dispatch.apply(this,
                ["slice_new"].concat(Array.prototype.slice.apply(arguments)));
        },
        gradient: function() {
            return this._dispatch.apply(this,
                ["gradient"].concat(Array.prototype.slice.apply(arguments)));
        },
        ungroup: function() {
            return this._dispatch.apply(this,
                ["ungroup"].concat(Array.prototype.slice.apply(arguments)));
        },
        group: function() {
            return this._dispatch.apply(this,
                ["group"].concat(Array.prototype.slice.apply(arguments)));
        },
        pseudoatom: function() {
            return this._dispatch.apply(this,
                ["pseudoatom"].concat(Array.prototype.slice.apply(arguments)));
        },
        fab: function() {
            return this._dispatch.apply(this,
                ["fab"].concat(Array.prototype.slice.apply(arguments)));
        },
        enable: function() {
            return this._dispatch.apply(this,
                ["enable"].concat(Array.prototype.slice.apply(arguments)));
        },
        disable: function() {
            return this._dispatch.apply(this,
                ["disable"].concat(Array.prototype.slice.apply(arguments)));
        },
        delete_: function() {
            return this._dispatch.apply(this,
                ["delete_"].concat(Array.prototype.slice.apply(arguments)));
        },
        reinitialize: function() {
            return this._dispatch.apply(this,
                ["reinitialize"].concat(Array.prototype.slice.apply(arguments)));
        },
        deselect: function() {
            return this._dispatch.apply(this,
                ["deselect"].concat(Array.prototype.slice.apply(arguments)));
        },
        select: function() {
            return this._dispatch.apply(this,
                ["select"].concat(Array.prototype.slice.apply(arguments)));
        },
        indicate: function() {
            return this._dispatch.apply(this,
                ["indicate"].concat(Array.prototype.slice.apply(arguments)));
        },
        select_list: function() {
            return this._dispatch.apply(this,
                ["select_list"].concat(Array.prototype.slice.apply(arguments)));
        },
        pop: function() {
            return this._dispatch.apply(this,
                ["pop"].concat(Array.prototype.slice.apply(arguments)));
        },
        angle: function() {
            return this._dispatch.apply(this,
                ["angle"].concat(Array.prototype.slice.apply(arguments)));
        },
        dihedral: function() {
            return this._dispatch.apply(this,
                ["dihedral"].concat(Array.prototype.slice.apply(arguments)));
        },
        dist: function() {
            return this._dispatch.apply(this,
                ["dist"].concat(Array.prototype.slice.apply(arguments)));
        },
        distance: function() {
            return this._dispatch.apply(this,
                ["distance"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_angle: function() {
            return this._dispatch.apply(this,
                ["get_angle"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_dihedral: function() {
            return this._dispatch.apply(this,
                ["get_dihedral"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_distance: function() {
            return this._dispatch.apply(this,
                ["get_distance"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_area: function() {
            return this._dispatch.apply(this,
                ["get_area"].concat(Array.prototype.slice.apply(arguments)));
        },
        color: function() {
            return this._dispatch.apply(this,
                ["color"].concat(Array.prototype.slice.apply(arguments)));
        },
        bg_color: function() {
            return this._dispatch.apply(this,
                ["bg_color"].concat(Array.prototype.slice.apply(arguments)));
        },
        rebuild: function() {
            return this._dispatch.apply(this,
                ["rebuild"].concat(Array.prototype.slice.apply(arguments)));
        },
        refresh: function() {
            return this._dispatch.apply(this,
                ["refresh"].concat(Array.prototype.slice.apply(arguments)));
        },
        recolor: function() {
            return this._dispatch.apply(this,
                ["recolor"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_color: function() {
            return this._dispatch.apply(this,
                ["set_color"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_object_color: function() {
            return this._dispatch.apply(this,
                ["set_object_color"].concat(Array.prototype.slice.apply(arguments)));
        },
        show: function() {
            return this._dispatch.apply(this,
                ["show"].concat(Array.prototype.slice.apply(arguments)));
        },
        show_as: function() {
            return this._dispatch.apply(this,
                ["show_as"].concat(Array.prototype.slice.apply(arguments)));
        },
        hide: function() {
            return this._dispatch.apply(this,
                ["hide"].concat(Array.prototype.slice.apply(arguments)));
        },
        cartoon: function() {
            return this._dispatch.apply(this,
                ["cartoon"].concat(Array.prototype.slice.apply(arguments)));
        },
        spectrum: function() {
            return this._dispatch.apply(this,
                ["spectrum"].concat(Array.prototype.slice.apply(arguments)));
        },
        center: function() {
            return this._dispatch.apply(this,
                ["center"].concat(Array.prototype.slice.apply(arguments)));
        },
        zoom: function() {
            return this._dispatch.apply(this,
                ["zoom"].concat(Array.prototype.slice.apply(arguments)));
        },
        reset: function() {
            return this._dispatch.apply(this,
                ["reset"].concat(Array.prototype.slice.apply(arguments)));
        },
        clip: function() {
            return this._dispatch.apply(this,
                ["clip"].concat(Array.prototype.slice.apply(arguments)));
        },
        orient: function() {
            return this._dispatch.apply(this,
                ["orient"].concat(Array.prototype.slice.apply(arguments)));
        },
        origin: function() {
            return this._dispatch.apply(this,
                ["origin"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_view: function() {
            return this._dispatch.apply(this,
                ["set_view"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_view: function() {
            return this._dispatch.apply(this,
                ["get_view"].concat(Array.prototype.slice.apply(arguments)));
        },
        move: function() {
            return this._dispatch.apply(this,
                ["move"].concat(Array.prototype.slice.apply(arguments)));
        },
        turn: function() {
            return this._dispatch.apply(this,
                ["turn"].concat(Array.prototype.slice.apply(arguments)));
        },
        rock: function() {
            return this._dispatch.apply(this,
                ["rock"].concat(Array.prototype.slice.apply(arguments)));
        },
        stereo: function() {
            return this._dispatch.apply(this,
                ["stereo"].concat(Array.prototype.slice.apply(arguments)));
        },
        get: function() {
            return this._dispatch.apply(this,
                ["get"].concat(Array.prototype.slice.apply(arguments)));
        },
        set: function() {
            return this._dispatch.apply(this,
                ["set"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_bond: function() {
            return this._dispatch.apply(this,
                ["set_bond"].concat(Array.prototype.slice.apply(arguments)));
        },
        unset: function() {
            return this._dispatch.apply(this,
                ["unset"].concat(Array.prototype.slice.apply(arguments)));
        },
        unset_bond: function() {
            return this._dispatch.apply(this,
                ["unset_bond"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_setting_boolean: function() {
            return this._dispatch.apply(this,
                ["get_setting_boolean"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_setting_int: function() {
            return this._dispatch.apply(this,
                ["get_setting_int"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_setting_float: function() {
            return this._dispatch.apply(this,
                ["get_setting_float"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_setting_legacy: function() {
            return this._dispatch.apply(this,
                ["get_setting_legacy"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_setting_tuple: function() {
            return this._dispatch.apply(this,
                ["get_setting_tuple"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_setting_text: function() {
            return this._dispatch.apply(this,
                ["get_setting_text"].concat(Array.prototype.slice.apply(arguments)));
        },
        window: function() {
            return this._dispatch.apply(this,
                ["window"].concat(Array.prototype.slice.apply(arguments)));
        },
        viewport: function() {
            return this._dispatch.apply(this,
                ["viewport"].concat(Array.prototype.slice.apply(arguments)));
        },
        full_screen: function() {
            return this._dispatch.apply(this,
                ["full_screen"].concat(Array.prototype.slice.apply(arguments)));
        },
        quit: function() {
            return this._dispatch.apply(this,
                ["quit"].concat(Array.prototype.slice.apply(arguments)));
        },
        draw: function() {
            return this._dispatch.apply(this,
                ["draw"].concat(Array.prototype.slice.apply(arguments)));
        },
        ray: function() {
            return this._dispatch.apply(this,
                ["ray"].concat(Array.prototype.slice.apply(arguments)));
        },
        align: function() {
            return this._dispatch.apply(this,
                ["align"].concat(Array.prototype.slice.apply(arguments)));
        },
        super_: function() {
            return this._dispatch.apply(this,
                ["super_"].concat(Array.prototype.slice.apply(arguments)));
        },
        fit: function() {
            return this._dispatch.apply(this,
                ["fit"].concat(Array.prototype.slice.apply(arguments)));
        },
        rms: function() {
            return this._dispatch.apply(this,
                ["rms"].concat(Array.prototype.slice.apply(arguments)));
        },
        rms_cur: function() {
            return this._dispatch.apply(this,
                ["rms_cur"].concat(Array.prototype.slice.apply(arguments)));
        },
        intra_fit: function() {
            return this._dispatch.apply(this,
                ["intra_fit"].concat(Array.prototype.slice.apply(arguments)));
        },
        intra_rms: function() {
            return this._dispatch.apply(this,
                ["intra_rms"].concat(Array.prototype.slice.apply(arguments)));
        },
        intra_rms_cur: function() {
            return this._dispatch.apply(this,
                ["intra_rms_cur"].concat(Array.prototype.slice.apply(arguments)));
        },
        pair_fit: function() {
            return this._dispatch.apply(this,
                ["pair_fit"].concat(Array.prototype.slice.apply(arguments)));
        },
        space: function() {
            return this._dispatch.apply(this,
                ["space"].concat(Array.prototype.slice.apply(arguments)));
        },
        order: function() {
            return this._dispatch.apply(this,
                ["order"].concat(Array.prototype.slice.apply(arguments)));
        },
        edit_mode: function() {
            return this._dispatch.apply(this,
                ["edit_mode"].concat(Array.prototype.slice.apply(arguments)));
        },
        button: function() {
            return this._dispatch.apply(this,
                ["button"].concat(Array.prototype.slice.apply(arguments)));
        },
        config_mouse: function() {
            return this._dispatch.apply(this,
                ["config_mouse"].concat(Array.prototype.slice.apply(arguments)));
        },
        mouse: function() {
            return this._dispatch.apply(this,
                ["mouse"].concat(Array.prototype.slice.apply(arguments)));
        },
        mask: function() {
            return this._dispatch.apply(this,
                ["mask"].concat(Array.prototype.slice.apply(arguments)));
        },
        unmask: function() {
            return this._dispatch.apply(this,
                ["unmask"].concat(Array.prototype.slice.apply(arguments)));
        },
        count_atoms: function() {
            return this._dispatch.apply(this,
                ["count_atoms"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_chains: function() {
            return this._dispatch.apply(this,
                ["get_chains"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_color_index: function() {
            return this._dispatch.apply(this,
                ["get_color_index"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_color_indices: function() {
            return this._dispatch.apply(this,
                ["get_color_indices"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_object_color_index: function() {
            return this._dispatch.apply(this,
                ["get_object_color_index"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_object_list: function() {
            return this._dispatch.apply(this,
                ["get_object_list"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_color_tuple: function() {
            return this._dispatch.apply(this,
                ["get_color_tuple"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_atom_coords: function() {
            return this._dispatch.apply(this,
                ["get_atom_coords"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_extent: function() {
            return this._dispatch.apply(this,
                ["get_extent"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_names: function() {
            return this._dispatch.apply(this,
                ["get_names"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_names_of_type: function() {
            return this._dispatch.apply(this,
                ["get_names_of_type"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_legal_name: function() {
            return this._dispatch.apply(this,
                ["get_legal_name"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_unused_name: function() {
            return this._dispatch.apply(this,
                ["get_unused_name"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_object_matrix: function() {
            return this._dispatch.apply(this,
                ["get_object_matrix"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_phipsi: function() {
            return this._dispatch.apply(this,
                ["get_phipsi"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_position: function() {
            return this._dispatch.apply(this,
                ["get_position"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_raw_alignment: function() {
            return this._dispatch.apply(this,
                ["get_raw_alignment"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_renderer: function() {
            return this._dispatch.apply(this,
                ["get_renderer"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_symmetry: function() {
            return this._dispatch.apply(this,
                ["get_symmetry"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_title: function() {
            return this._dispatch.apply(this,
                ["get_title"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_type: function() {
            return this._dispatch.apply(this,
                ["get_type"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_version: function() {
            return this._dispatch.apply(this,
                ["get_version"].concat(Array.prototype.slice.apply(arguments)));
        },
        id_atom: function() {
            return this._dispatch.apply(this,
                ["id_atom"].concat(Array.prototype.slice.apply(arguments)));
        },
        identify: function() {
            return this._dispatch.apply(this,
                ["identify"].concat(Array.prototype.slice.apply(arguments)));
        },
        index: function() {
            return this._dispatch.apply(this,
                ["index"].concat(Array.prototype.slice.apply(arguments)));
        },
        phi_psi: function() {
            return this._dispatch.apply(this,
                ["phi_psi"].concat(Array.prototype.slice.apply(arguments)));
        },
        matrix_copy: function() {
            return this._dispatch.apply(this,
                ["matrix_copy"].concat(Array.prototype.slice.apply(arguments)));
        },
        matrix_reset: function() {
            return this._dispatch.apply(this,
                ["matrix_reset"].concat(Array.prototype.slice.apply(arguments)));
        },
        rotate: function() {
            return this._dispatch.apply(this,
                ["rotate"].concat(Array.prototype.slice.apply(arguments)));
        },
        translate: function() {
            return this._dispatch.apply(this,
                ["translate"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_object_ttt: function() {
            return this._dispatch.apply(this,
                ["set_object_ttt"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_dihedral: function() {
            return this._dispatch.apply(this,
                ["set_dihedral"].concat(Array.prototype.slice.apply(arguments)));
        },
        transform_object: function() {
            return this._dispatch.apply(this,
                ["transform_object"].concat(Array.prototype.slice.apply(arguments)));
        },
        transform_selection: function() {
            return this._dispatch.apply(this,
                ["transform_selection"].concat(Array.prototype.slice.apply(arguments)));
        },
        translate_atom: function() {
            return this._dispatch.apply(this,
                ["translate_atom"].concat(Array.prototype.slice.apply(arguments)));
        },
        update: function() {
            return this._dispatch.apply(this,
                ["update"].concat(Array.prototype.slice.apply(arguments)));
        },
        attach: function() {
            return this._dispatch.apply(this,
                ["attach"].concat(Array.prototype.slice.apply(arguments)));
        },
        bond: function() {
            return this._dispatch.apply(this,
                ["bond"].concat(Array.prototype.slice.apply(arguments)));
        },
        unbond: function() {
            return this._dispatch.apply(this,
                ["unbond"].concat(Array.prototype.slice.apply(arguments)));
        },
        cycle_valence: function() {
            return this._dispatch.apply(this,
                ["cycle_valence"].concat(Array.prototype.slice.apply(arguments)));
        },
        drag: function() {
            return this._dispatch.apply(this,
                ["drag"].concat(Array.prototype.slice.apply(arguments)));
        },
        dss: function() {
            return this._dispatch.apply(this,
                ["dss"].concat(Array.prototype.slice.apply(arguments)));
        },
        edit: function() {
            return this._dispatch.apply(this,
                ["edit"].concat(Array.prototype.slice.apply(arguments)));
        },
        unpick: function() {
            return this._dispatch.apply(this,
                ["unpick"].concat(Array.prototype.slice.apply(arguments)));
        },
        fix_chemistry: function() {
            return this._dispatch.apply(this,
                ["fix_chemistry"].concat(Array.prototype.slice.apply(arguments)));
        },
        flag: function() {
            return this._dispatch.apply(this,
                ["flag"].concat(Array.prototype.slice.apply(arguments)));
        },
        fuse: function() {
            return this._dispatch.apply(this,
                ["fuse"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_editor_scheme: function() {
            return this._dispatch.apply(this,
                ["get_editor_scheme"].concat(Array.prototype.slice.apply(arguments)));
        },
        h_add: function() {
            return this._dispatch.apply(this,
                ["h_add"].concat(Array.prototype.slice.apply(arguments)));
        },
        h_fill: function() {
            return this._dispatch.apply(this,
                ["h_fill"].concat(Array.prototype.slice.apply(arguments)));
        },
        h_fix: function() {
            return this._dispatch.apply(this,
                ["h_fix"].concat(Array.prototype.slice.apply(arguments)));
        },
        invert: function() {
            return this._dispatch.apply(this,
                ["invert"].concat(Array.prototype.slice.apply(arguments)));
        },
        torsion: function() {
            return this._dispatch.apply(this,
                ["torsion"].concat(Array.prototype.slice.apply(arguments)));
        },
        valence: function() {
            return this._dispatch.apply(this,
                ["valence"].concat(Array.prototype.slice.apply(arguments)));
        },
        clean: function() {
            return this._dispatch.apply(this,
                ["clean"].concat(Array.prototype.slice.apply(arguments)));
        },
        deprotect: function() {
            return this._dispatch.apply(this,
                ["deprotect"].concat(Array.prototype.slice.apply(arguments)));
        },
        protect: function() {
            return this._dispatch.apply(this,
                ["protect"].concat(Array.prototype.slice.apply(arguments)));
        },
        reference: function() {
            return this._dispatch.apply(this,
                ["reference"].concat(Array.prototype.slice.apply(arguments)));
        },
        remove: function() {
            return this._dispatch.apply(this,
                ["remove"].concat(Array.prototype.slice.apply(arguments)));
        },
        remove_picked: function() {
            return this._dispatch.apply(this,
                ["remove_picked"].concat(Array.prototype.slice.apply(arguments)));
        },
        rename: function() {
            return this._dispatch.apply(this,
                ["rename"].concat(Array.prototype.slice.apply(arguments)));
        },
        replace: function() {
            return this._dispatch.apply(this,
                ["replace"].concat(Array.prototype.slice.apply(arguments)));
        },
        sculpt_purge: function() {
            return this._dispatch.apply(this,
                ["sculpt_purge"].concat(Array.prototype.slice.apply(arguments)));
        },
        sculpt_deactivate: function() {
            return this._dispatch.apply(this,
                ["sculpt_deactivate"].concat(Array.prototype.slice.apply(arguments)));
        },
        sculpt_activate: function() {
            return this._dispatch.apply(this,
                ["sculpt_activate"].concat(Array.prototype.slice.apply(arguments)));
        },
        sculpt_iterate: function() {
            return this._dispatch.apply(this,
                ["sculpt_iterate"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_geometry: function() {
            return this._dispatch.apply(this,
                ["set_geometry"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_symmetry: function() {
            return this._dispatch.apply(this,
                ["set_symmetry"].concat(Array.prototype.slice.apply(arguments)));
        },
        set_title: function() {
            return this._dispatch.apply(this,
                ["set_title"].concat(Array.prototype.slice.apply(arguments)));
        },
        smooth: function() {
            return this._dispatch.apply(this,
                ["smooth"].concat(Array.prototype.slice.apply(arguments)));
        },
        sort: function() {
            return this._dispatch.apply(this,
                ["sort"].concat(Array.prototype.slice.apply(arguments)));
        },
        undo: function() {
            return this._dispatch.apply(this,
                ["undo"].concat(Array.prototype.slice.apply(arguments)));
        },
        push_undo: function() {
            return this._dispatch.apply(this,
                ["push_undo"].concat(Array.prototype.slice.apply(arguments)));
        },
        redo: function() {
            return this._dispatch.apply(this,
                ["redo"].concat(Array.prototype.slice.apply(arguments)));
        },
        wizard: function() {
            return this._dispatch.apply(this,
                ["wizard"].concat(Array.prototype.slice.apply(arguments)));
        },
        replace_wizard: function() {
            return this._dispatch.apply(this,
                ["replace_wizard"].concat(Array.prototype.slice.apply(arguments)));
        },
        count_frames: function() {
            return this._dispatch.apply(this,
                ["count_frames"].concat(Array.prototype.slice.apply(arguments)));
        },
        count_states: function() {
            return this._dispatch.apply(this,
                ["count_states"].concat(Array.prototype.slice.apply(arguments)));
        },
        mset: function() {
            return this._dispatch.apply(this,
                ["mset"].concat(Array.prototype.slice.apply(arguments)));
        },
        madd: function() {
            return this._dispatch.apply(this,
                ["madd"].concat(Array.prototype.slice.apply(arguments)));
        },
        mclear: function() {
            return this._dispatch.apply(this,
                ["mclear"].concat(Array.prototype.slice.apply(arguments)));
        },
        mmatrix: function() {
            return this._dispatch.apply(this,
                ["mmatrix"].concat(Array.prototype.slice.apply(arguments)));
        },
        mdump: function() {
            return this._dispatch.apply(this,
                ["mdump"].concat(Array.prototype.slice.apply(arguments)));
        },
        mview: function() {
            return this._dispatch.apply(this,
                ["mview"].concat(Array.prototype.slice.apply(arguments)));
        },
        forward: function() {
            return this._dispatch.apply(this,
                ["forward"].concat(Array.prototype.slice.apply(arguments)));
        },
        backward: function() {
            return this._dispatch.apply(this,
                ["backward"].concat(Array.prototype.slice.apply(arguments)));
        },
        rewind: function() {
            return this._dispatch.apply(this,
                ["rewind"].concat(Array.prototype.slice.apply(arguments)));
        },
        middle: function() {
            return this._dispatch.apply(this,
                ["middle"].concat(Array.prototype.slice.apply(arguments)));
        },
        ending: function() {
            return this._dispatch.apply(this,
                ["ending"].concat(Array.prototype.slice.apply(arguments)));
        },
        mplay: function() {
            return this._dispatch.apply(this,
                ["mplay"].concat(Array.prototype.slice.apply(arguments)));
        },
        mtoggle: function() {
            return this._dispatch.apply(this,
                ["mtoggle"].concat(Array.prototype.slice.apply(arguments)));
        },
        mstop: function() {
            return this._dispatch.apply(this,
                ["mstop"].concat(Array.prototype.slice.apply(arguments)));
        },
        frame: function() {
            return this._dispatch.apply(this,
                ["frame"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_movie_playing: function() {
            return this._dispatch.apply(this,
                ["get_movie_playing"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_state: function() {
            return this._dispatch.apply(this,
                ["get_state"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_frame: function() {
            return this._dispatch.apply(this,
                ["get_frame"].concat(Array.prototype.slice.apply(arguments)));
        },
        view: function() {
            return this._dispatch.apply(this,
                ["view"].concat(Array.prototype.slice.apply(arguments)));
        },
        get_scene_list: function() {
            return this._dispatch.apply(this,
                ["get_scene_list"].concat(Array.prototype.slice.apply(arguments)));
        },
        scene: function() {
            return this._dispatch.apply(this,
                ["scene"].concat(Array.prototype.slice.apply(arguments)));
        },
        scene_order: function() {
            return this._dispatch.apply(this,
                ["scene_order"].concat(Array.prototype.slice.apply(arguments)));
        }

        // END MACHINE-GENERATED CODE

    }

    this.getattr = {
      dispatch: function(attrname) {
        if (attrname) {
          mypath = "/getattr/pymol." + attrname;
          this._outer._send(mypath);
        }
      }
      //      viewing: function() {
      //        this._dispatch("viewing");
      //      }
    }

    // enable inner pseudo-inner-instance to find the outer instance

    this.cmd._outer                = this
    this.getattr._outer            = this
}

// utility functions not used above, but of use to some users, one hopes
function parse_file(f) {
  var re = /[\\\/]/;
  fields = f.split(re);
  filename = fields[fields.length-1];
  dot = filename.lastIndexOf('.');
  if (dot > -1) {
    name = filename.slice(0,dot);
    ext    = filename.slice(dot);
  } else {
    name = filename;
    ext = "";
  }
  // Javascript 1.7+ only in Mozilla?
  // return [name, ext];
  return new Array(name, ext);
}
function validate_file(n,f) {
  if (f.value) {
    // Javascript 1.7+ only in Mozilla?
    // [name, ext] = parse_file(f.value);
    parsed = parse_file(f.value);
    name = parsed[0];
    ext = parsed[1];
    if (name) {
      n.value = name;
      //add_checkbox(name, "objects");
      return true;
    } else {
      alert('cannot extract name from file');
      return false;
    }
  } else {
    alert('no file selected');
    return false;
  }
}


/*
Copyright 2008 Intel Corporation

Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
*/
#include <boost/polygon/polygon.hpp>
#include <list>
#include <time.h>
#include <cassert>
#include <deque>
#include <iostream>
namespace gtl = boost::polygon;
using namespace boost::polygon::operators;

//once again we make our usage of the library generic
//and parameterize it on the polygon set type
template <typename PolygonSet>
void test_polygon_set() {
  using namespace gtl;
  PolygonSet ps;
  ps += rectangle_data<int>(0, 0, 10, 10);
  PolygonSet ps2;
  ps2 += rectangle_data<int>(5, 5, 15, 15);
  PolygonSet ps3;
  assign(ps3, ps * ps2);
  PolygonSet ps4;
  ps4 += ps + ps2;
  assert(area(ps4) == area(ps) + area(ps2) - area(ps3));
  assert(equivalence((ps + ps2) - (ps * ps2), ps ^ ps2));
  rectangle_data<int> rect;
  assert(extents(rect, ps ^ ps2));
  assert(area(rect) == 225);
  assert(area(rect ^ (ps ^ ps2)) == area(rect) - area(ps ^ ps2));
}

//first thing is first, lets include all the code from previous examples

//the CPoint example
struct CPoint {
  int x;
  int y;
};

namespace boost { namespace polygon {
    template <>
    struct geometry_concept<CPoint> { typedef point_concept type; };
    template <>
    struct point_traits<CPoint> {
      typedef int coordinate_type;

      static inline coordinate_type get(const CPoint& point,
					orientation_2d orient) {
	if(orient == HORIZONTAL)
	  return point.x;
	return point.y;
      }
    };

    template <>
    struct point_mutable_traits<CPoint> {
      typedef int coordinate_type;

      static inline void set(CPoint& point, orientation_2d orient, int value) {
	if(orient == HORIZONTAL)
	  point.x = value;
	else
	  point.y = value;
      }
      static inline CPoint construct(int x_value, int y_value) {
	CPoint retval;
	retval.x = x_value;
	retval.y = y_value;
	return retval;
      }
    };
  } }

//the CPolygon example
typedef std::list<CPoint> CPolygon;

//we need to specialize our polygon concept mapping in boost polygon
namespace boost { namespace polygon {
    //first register CPolygon as a polygon_concept type
    template <>
    struct geometry_concept<CPolygon>{ typedef polygon_concept type; };

    template <>
    struct polygon_traits<CPolygon> {
      typedef int coordinate_type;
      typedef CPolygon::const_iterator iterator_type;
      typedef CPoint point_type;

      // Get the begin iterator
      static inline iterator_type begin_points(const CPolygon& t) {
	return t.begin();
      }

      // Get the end iterator
      static inline iterator_type end_points(const CPolygon& t) {
	return t.end();
      }

      // Get the number of sides of the polygon
      static inline std::size_t size(const CPolygon& t) {
	return t.size();
      }

      // Get the winding direction of the polygon
      static inline winding_direction winding(const CPolygon& t) {
	return unknown_winding;
      }
    };

    template <>
    struct polygon_mutable_traits<CPolygon> {
      //expects stl style iterators
      template <typename iT>
      static inline CPolygon& set_points(CPolygon& t,
					 iT input_begin, iT input_end) {
	t.clear();
	while(input_begin != input_end) {
	  t.push_back(CPoint());
	  gtl::assign(t.back(), *input_begin);
	  ++input_begin;
	}
	return t;
      }

    };
  } }

//OK, finally we get to declare our own polygon set type
typedef std::deque<CPolygon> CPolygonSet;

//deque isn't automatically a polygon set in the library
//because it is a standard container there is a shortcut
//for mapping it to polygon set concept, but I'll do it
//the long way that you would use in the general case.
namespace boost { namespace polygon {
    //first we register CPolygonSet as a polygon set
    template <>
    struct geometry_concept<CPolygonSet> { typedef polygon_set_concept type; };

    //next we map to the concept through traits
    template <>
    struct polygon_set_traits<CPolygonSet> {
      typedef int coordinate_type;
      typedef CPolygonSet::const_iterator iterator_type;
      typedef CPolygonSet operator_arg_type;

      static inline iterator_type begin(const CPolygonSet& polygon_set) {
	return polygon_set.begin();
      }

      static inline iterator_type end(const CPolygonSet& polygon_set) {
	return polygon_set.end();
      }

      //don't worry about these, just return false from them
      static inline bool clean(const CPolygonSet& polygon_set) { return false; }
      static inline bool sorted(const CPolygonSet& polygon_set) { return false; }
    };

    template <>
    struct polygon_set_mutable_traits<CPolygonSet> {
      template <typename input_iterator_type>
      static inline void set(CPolygonSet& polygon_set, input_iterator_type input_begin, input_iterator_type input_end) {
	polygon_set.clear();
	//this is kind of cheesy. I am copying the unknown input geometry
	//into my own polygon set and then calling get to populate the
	//deque
	polygon_set_data<int> ps;
	ps.insert(input_begin, input_end);
	ps.get(polygon_set);
	//if you had your own odd-ball polygon set you would probably have
	//to iterate through each polygon at this point and do something
	//extra
      }
    };
} }

int main() {
  long long c1 = clock();
  for(int i = 0; i < 1000; ++i)
    test_polygon_set<CPolygonSet>();
  long long c2 = clock();
  for(int i = 0; i < 1000; ++i)
    test_polygon_set<gtl::polygon_set_data<int> >();
  long long c3 = clock();
  long long diff1 = c2 - c1;
  long long diff2 = c3 - c2;
  if(diff1 > 0 && diff2)
    std::cout << "library polygon_set_data is " << float(diff1)/float(diff2) << "X faster than custom polygon set deque of CPolygon" << std::endl;
  else
    std::cout << "operation was too fast" << std::endl;
  return 0;
}

//Now you know how to map your own data type to polygon set concept
//Now you also know how to make your application code that operates on geometry
//data type agnostic from point through polygon set


package Paws::MediaConvert::GetJob;
  use Moose;
  has Id => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'id', required => 1);

  use MooseX::ClassAttribute;

  class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetJob');
  class_has _api_uri  => (isa => 'Str', is => 'ro', default => '/2017-08-29/jobs/{id}');
  class_has _api_method  => (isa => 'Str', is => 'ro', default => 'GET');
  class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::MediaConvert::GetJobResponse');
1;

### main pod documentation begin ###

=head1 NAME

Paws::MediaConvert::GetJob - Arguments for method GetJob on L<Paws::MediaConvert>

=head1 DESCRIPTION

This class represents the parameters used for calling the method GetJob on the
L<AWS Elemental MediaConvert|Paws::MediaConvert> service. Use the attributes of this class
as arguments to method GetJob.

You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetJob.

=head1 SYNOPSIS

    my $mediaconvert = Paws->service('MediaConvert');
    my $GetJobResponse = $mediaconvert->GetJob(
      Id => 'My__string',

    );

    # Results:
    my $Job = $GetJobResponse->Job;

    # Returns a L<Paws::MediaConvert::GetJobResponse> object.

Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/mediaconvert/GetJob>

=head1 ATTRIBUTES

=head2 B<REQUIRED> Id => Str

the job ID of the job.

=head1 SEE ALSO

This class forms part of L<Paws>, documenting arguments for method GetJob in L<Paws::MediaConvert>

=head1 BUGS and CONTRIBUTIONS

The source code is located here: L<https://github.com/pplu/aws-sdk-perl>

Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>

=cut


.label-success{
    font-size: 17;
    color: #18b58b;
    font-weight: 600;
}

.label-failed{
    font-size: 17;
    color: #fa0909;
    font-weight: 600;
}

.label-category{
    color: #606060;
    font-size: 15;
}

.user-name{
    padding-top:3;
    color:#616161;
    font-size: 17;
}
.label-score{
    color: #8c8c8c;
    font-size: 15;
}

.border-left{
    border-color: #dfdfdf;
    border-width: 0 2 0 0;
    border-style: dotted;
    width: 95%;
    height: 1;
}


// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package version records versioning information about this module.
package version

import (
	"fmt"
	"strings"
)

// These constants determine the current version of this module.
//
//
// For our release process, we enforce the following rules:
//	* Tagged releases use a tag that is identical to String.
//	* Tagged releases never reference a commit where the String
//	contains "devel".
//	* The set of all commits in this repository where String
//	does not contain "devel" must have a unique String.
//
//
// Steps for tagging a new release:
//	1. Create a new CL.
//
//	2. Update Minor, Patch, and/or PreRelease as necessary.
//	PreRelease must not contain the string "devel".
//
//	3. Since the last released minor version, have there been any changes to
//	generator that relies on new functionality in the runtime?
//	If yes, then increment RequiredGenerated.
//
//	4. Since the last released minor version, have there been any changes to
//	the runtime that removes support for old .pb.go source code?
//	If yes, then increment SupportMinimum.
//
//	5. Send out the CL for review and submit it.
//	Note that the next CL in step 8 must be submitted after this CL
//	without any other CLs in-between.
//
//	6. Tag a new version, where the tag is is the current String.
//
//	7. Write release notes for all notable changes
//	between this release and the last release.
//
//	8. Create a new CL.
//
//	9. Update PreRelease to include the string "devel".
//	For example: "" -> "devel" or "rc.1" -> "rc.1.devel"
//
//	10. Send out the CL for review and submit it.
const (
	Major      = 1
	Minor      = 23
	Patch      = 0
	PreRelease = ""
)

// String formats the version string for this module in semver format.
//
// Examples:
//	v1.20.1
//	v1.21.0-rc.1
func String() string {
	v := fmt.Sprintf("v%d.%d.%d", Major, Minor, Patch)
	if PreRelease != "" {
		v += "-" + PreRelease

		// TODO: Add metadata about the commit or build hash.
		// See https://golang.org/issue/29814
		// See https://golang.org/issue/33533
		var metadata string
		if strings.Contains(PreRelease, "devel") && metadata != "" {
			v += "+" + metadata
		}
	}
	return v
}