text:
#include "modules/perception/camera/lib/feature_extractor/tfe/external_feature_extractor.h"

#include <map>
#include <vector>

#include "cyber/common/file.h"
#include "modules/perception/camera/common/global_config.h"
#include "modules/perception/camera/common/util.h"
#include "modules/perception/inference/inference_factory.h"
#include "modules/perception/inference/utils/resize.h"

namespace apollo {
namespace perception {
namespace camera {

using cyber::common::GetAbsolutePath;

bool ExternalFeatureExtractor::Init(
    const FeatureExtractorInitOptions &options) {
  std::string efx_config = GetAbsolutePath(options.root_dir, options.conf_file);
  ACHECK(cyber::common::GetProtoFromFile(efx_config, &param_))
      << "Read config failed: " << efx_config;
  AINFO << "Load config Success: " << param_.ShortDebugString();
  std::string proto_file =
      GetAbsolutePath(options.root_dir, param_.proto_file());
  std::string weight_file =
      GetAbsolutePath(options.root_dir, param_.weight_file());
  std::vector<std::string> input_names;
  std::vector<std::string> output_names;
  input_names.push_back(param_.input_blob());
  output_names.push_back(param_.feat_blob());
  height_ = param_.resize_height();
  width_ = param_.resize_width();
  const auto &model_type = param_.model_type();
  AINFO << "model_type=" << model_type;
  inference_.reset(inference::CreateInferenceByName(
      model_type, proto_file, weight_file, output_names, input_names,
      options.root_dir));
  ACHECK(nullptr != inference_) << "Failed to init CNNAdapter";
  gpu_id_ = GlobalConfig::Instance()->track_feature_gpu_id;
  inference_->set_gpu_id(gpu_id_);
  std::vector<int> shape = {1, height_, width_, 3};
  std::map<std::string, std::vector<int>> shape_map{
      {param_.input_blob(), shape}};

  ACHECK(inference_->Init(shape_map));
  inference_->Infer();
  InitFeatureExtractor(options.root_dir);
  image_.reset(new base::Image8U(height_, width_, base::Color::BGR));
  return true;
}
bool ExternalFeatureExtractor::InitFeatureExtractor(
    const std::string &root_dir) {
  FeatureExtractorInitOptions feat_options;
  feat_options.conf_file = param_.feature_file();
  feat_options.root_dir = root_dir;
  feat_options.gpu_id = gpu_id_;
  auto feat_blob_name = param_.feat_blob();
  feat_options.feat_blob = inference_->get_blob(feat_blob_name);
  feat_options.input_height = height_;
  feat_options.input_width = width_;
  feature_extractor_.reset(BaseFeatureExtractorRegisterer::GetInstanceByName(
      "TrackingFeatureExtractor"));
  feature_extractor_->Init(feat_options);
  return true;
}
bool ExternalFeatureExtractor::Extract(const FeatureExtractorOptions &options,
                                       CameraFrame *frame) {
  int raw_height = frame->data_provider->src_height();
  int raw_width = frame->data_provider->src_width();
  auto input_blob = inference_->get_blob(param_.input_blob());
  DataProvider::ImageOptions image_options;
  image_options.target_color = base::Color::BGR;
  auto offset_y_ = static_cast<int>(
      param_.offset_ratio() * static_cast<float>(raw_height) + 0.5f);
  image_options.crop_roi =
      base::RectI(0, offset_y_, raw_width, raw_height - offset_y_);
  image_options.do_crop = true;
  // Timer timer;
  frame->data_provider->GetImage(image_options, image_.get());
  inference::ResizeGPU(*image_, input_blob, raw_width, 0);
  inference_->Infer();
  FeatureExtractorOptions feat_options;
  feat_options.normalized = false;
  feature_extractor_->set_roi(
      image_options.crop_roi.x, image_options.crop_roi.y,
      image_options.crop_roi.width, image_options.crop_roi.height);
  feature_extractor_->Extract(feat_options, frame);
  AINFO << "Extract Done";
  return true;
}
std::string ExternalFeatureExtractor::Name() const {
  return "ExternalFeatureExtractor";
}
REGISTER_FEATURE_EXTRACTOR(ExternalFeatureExtractor);
}  // namespace camera
}  // namespace perception
}  // namespace apollo


text:
package org.elasticsearch.index.search.child;

import org.elasticsearch.ElasticSearchIllegalArgumentException;

/**
 * Defines how scores from child documents are mapped into the parent document.
 */
public enum ScoreType {

    /**
     * Only the highest score of all matching child documents is mapped into the parent.
     */
    MAX,

    /**
     * The average score based on all matching child documents are mapped into the parent.
     */
    AVG,

    /**
     * The matching children scores is summed up and mapped into the parent.
     */
    SUM;

    public static ScoreType fromString(String type) {
        if ("max".equals(type)) {
            return MAX;
        } else if ("avg".equals(type)) {
            return AVG;
        } else if ("sum".equals(type)) {
            return SUM;
        }
        throw new ElasticSearchIllegalArgumentException("No score type for child query [" + type + "] found");
    }

}

redpajama_set_name: RedPajamaGithub


text:
import 'chrome://resources/cr_elements/cr_button/cr_button.js';
import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js';
import 'chrome://resources/cr_elements/cr_shared_style.css.js';
import 'chrome://resources/cr_elements/cr_shared_vars.css.js';
import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js';
import './strings.m.js';
import './shared_style.css.js';

import {CrDialogElement} from 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js';
import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js';
import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';

import {getTemplate} from './restricted_sites_dialog.html.js';

export interface ExtensionsRestrictedSitesDialogElement {
  $: {
    dialog: CrDialogElement,
  };
}

const ExtensionsRestrictedSitesDialogElementBase = I18nMixin(PolymerElement);

export class ExtensionsRestrictedSitesDialogElement extends
    ExtensionsRestrictedSitesDialogElementBase {
  static get is() {
    return 'extensions-restricted-sites-dialog';
  }

  static get template() {
    return getTemplate();
  }

  static get properties() {
    return {
      firstRestrictedSite: {type: String, value: ''},
    };
  }

  firstRestrictedSite: string;

  isOpen(): boolean {
    return this.$.dialog.open;
  }

  wasConfirmed(): boolean {
    return this.$.dialog.getNative().returnValue === 'success';
  }

  private onCancelClick_() {
    this.$.dialog.cancel();
  }

  private onSubmitClick_() {
    this.$.dialog.close();
  }

  private getDialogTitle_(): string {
    return this.i18n('matchingRestrictedSitesTitle', this.firstRestrictedSite);
  }

  private getDialogWarning_(): string {
    return this.i18n(
        'matchingRestrictedSitesWarning', this.firstRestrictedSite);
  }
}

declare global {
  interface HTMLElementTagNameMap {
    'extensions-restricted-sites-dialog':
        ExtensionsRestrictedSitesDialogElement;
  }
}

customElements.define(
    ExtensionsRestrictedSitesDialogElement.is,
    ExtensionsRestrictedSitesDialogElement);


text:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Microsoft.Expression.Interactions</name>
    </assembly>
    <members>
        <member name="T:Microsoft.Expression.Interactivity.Core.ActionCommand">
            <summary>
ICommand 的基本实现,它包装无参数或具有一个参数的方法。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ActionCommand.#ctor(System.Action)">
            <summary>
初始化 <see cref="T:Microsoft.Expression.Interactivity.Core.ActionCommand"/> 类的新实例。
            </summary>
<param name="action">操作本身。</param>
<remarks>使用此构造函数提供忽略 ICommand 参数的操作。</remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ActionCommand.#ctor(System.Action{System.Object})">
            <summary>
初始化 <see cref="T:Microsoft.Expression.Interactivity.Core.ActionCommand"/> 类的新实例。
            </summary>
<param name="objectAction">具有一个对象参数的操作。</param>
<remarks>使用此构造函数提供一项操作,该操作使用 Execute 方法传递的对象参数。</remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ActionCommand.System#Windows#Input#ICommand#CanExecute(System.Object)">
            <summary>
定义方法,该方法确定此命令能否在其当前状态下执行。
            </summary>
<param name="parameter">此命令使用的数据。如果此命令不要求传递数据,则可以将该对象设置为 null。</param>
            <returns>
始终返回 true。
            </returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ActionCommand.Execute(System.Object)">
            <summary>
定义在调用此命令时要调用的方法。
            </summary>
<param name="parameter">此命令使用的数据。如果此命令不要求传递数据,则可以将该对象设置为 null。</param>
        </member>
        <member name="E:Microsoft.Expression.Interactivity.Core.ActionCommand.System#Windows#Input#ICommand#CanExecuteChanged">
            <summary>
在出现影响到是否应执行此命令的更改时发生。将不会由 ActionCommand 触发。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.CallMethodAction">
            <summary>
调用时对指定的对象调用方法。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.CallMethodAction.Invoke(System.Object)">
            <summary>
调用操作。
            </summary>
<param name="parameter">操作的参数。如果操作不需要参数,则可以将参数设置为空引用。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.CallMethodAction.OnAttached">
            <summary>
在操作附加到 AssociatedObject 后调用。
            </summary>
<remarks>替代它以便将功能挂钩到 AssociatedObject。</remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.CallMethodAction.OnDetaching">
            <summary>
在操作与其 AssociatedObject 分离时(但在它实际发生之前)调用。
            </summary>
<remarks>替代它以便将功能从 AssociatedObject 中解除挂钩。</remarks>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.CallMethodAction.TargetObject">
            <summary>
公开感兴趣的方法的对象。这是依赖属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.CallMethodAction.MethodName">
            <summary>
要调用的方法的名称。这是依赖属性。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ChangePropertyAction">
            <summary>
一项操作,它在被调用时会将指定的属性更改为指定的值。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.#ctor">
            <summary>
初始化 <see cref="T:Microsoft.Expression.Interactivity.Core.ChangePropertyAction"/> 类的新实例。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.Invoke(System.Object)">
            <summary>
调用操作。
            </summary>
<param name="parameter">操作的参数。如果操作不需要参数,则可以将参数设置为空引用。</param>
<exception cref="T:System.ArgumentException">无法在目标上找到名称为 <c cref="P:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.PropertyName"/> 的属性。</exception>
<exception cref="T:System.ArgumentException">无法将 <c cref="P:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.PropertyName"/> 设置为 <c cref="P:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.Value"/> 指定的值。</exception>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.PropertyName">
            <summary>
获得或设置要更改的属性的名称。这是依赖属性。
            </summary>
<value>要更改的属性的名称。</value>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.Value">
            <summary>
获得或设置要设置的值。这是依赖属性。
            </summary>
<value>要设置的值。</value>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.Duration">
            <summary>
获得或设置将在调用 ChangePropertyAction 时出现的动画的持续时间。这是依赖属性。如果未设置持续时间,则将不会应用动画。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.Increment">
            <summary>
如果为 true,则按值进行递增;否则,直接设置值。如果无法对属性进行递增,则将改为尝试直接设置该值。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ChangePropertyAction.Ease">
            <summary>
获得或设置在调用 ChangePropertyAction 时与动画一起使用的缓动函数。这是依赖属性。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ComparisonCondition">
            <summary>
表示一个三元条件。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ComparisonCondition.Evaluate">
            <summary>
计算条件的方法。请注意,如果运算符与类型不兼容,则此方法可能会引发 ArgumentException。例如,运算符 LessThan、LessThanOrEqual、GreaterThan 和 GreaterThanOrEqual 需要两个运算符来实现 IComparable。
            </summary>
<returns>如果已满足条件,则返回 true;否则返回 false。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ComparisonCondition.EnsureBindingUpToDate">
            <summary>
确保 DP 操作数上的任何绑定都是最新的。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ComparisonCondition.LeftOperand">
            <summary>
获取或设置左操作数。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ComparisonCondition.RightOperand">
            <summary>
获取或设置右操作数。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ComparisonCondition.Operator">
            <summary>
获取或设置比较运算符。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ComparisonConditionType">
            <summary>
不同比较运算符的枚举。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.ComparisonLogic.EvaluateImpl(System.Object,Microsoft.Expression.Interactivity.Core.ComparisonConditionType,System.Object)">
            <summary>
此方法计算操作数。
            </summary>
<param name="leftOperand">LeftOperand 属性的左操作数。</param>
<param name="operatorType">Operator 属性的运算符。</param>
<param name="rightOperand">RightOperand 属性的右操作数。</param>
<returns>如果满足条件,则返回 true;否则返回 false。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.ComparisonLogic.EvaluateComparable(System.IComparable,Microsoft.Expression.Interactivity.Core.ComparisonConditionType,System.IComparable)">
            <summary>
计算两个实现 IComparable 接口的操作数。
            </summary>
<param name="leftOperand">LeftOperand 属性的左操作数。</param>
<param name="operatorType">Operator 属性的运算符。</param>
<param name="rightOperand">RightOperand 属性的右操作数。</param>
<returns>如果满足条件,则返回 true;否则返回 false。</returns>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ForwardChaining">
            <summary>
前向链接。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ConditionalExpression">
            <summary>
表示针对 ConditionBehavior.Condition 属性设置的条件表达式。包含条件列表,将会对这些条件进行计算以针对 ICondition.Evaluate() 返回 true 或 false。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ICondition">
            <summary>
给定对象必须实现才能针对 ConditionBehavior.Condition 属性进行设置的接口。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ConditionalExpression.#ctor">
            <summary>
初始化 <see cref="T:Microsoft.Expression.Interactivity.Core.ConditionalExpression"/> 类的新实例。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ConditionalExpression.Evaluate">
            <summary>
全面检查条件集合并根据 ForwardChaining 属性计算每个条件。
            </summary>
<returns>如果满足条件,则返回 true;否则返回 false。</returns>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ConditionalExpression.ForwardChaining">
            <summary>
获取或设置条件的前向链接。如果前向链接设置为 ForwardChaining.And,则必须满足所有条件。如果前向链接设置为 ForwardChaining.Or,则只须满足一个条件。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ConditionalExpression.Conditions">
            <summary>
返回条件集合。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ConditionBehavior">
            <summary>
附加到触发器并控制触发操作的条件的行为。
            </summary>

        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ConditionBehavior.#ctor">
            <summary>
初始化 <see cref="T:Microsoft.Expression.Interactivity.Core.ConditionBehavior"/> 类的新实例。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ConditionBehavior.OnPreviewInvoke(System.Object,System.Windows.Interactivity.PreviewInvokeEventArgs)">
            <summary>
侦听触发器触发的预览调用事件的事件处理程序。如果将 PreviewInvokeEventArgs.Cancelling 设置为 True,则会取消调用。
            </summary>
<param name="sender">触发器基对象。</param>
<param name="e">一个 e.Cancelling 可设置为 True 的 PreviewInvokeEventArgs 类型的对象。</param>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.ConditionBehavior.Condition">
            <summary>
针对行为获取或设置 IConditon 对象。
            </summary>
<value>要更改的条件的名称。</value>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.DataBindingHelper">
            <summary>
用于管理依赖对象绑定表达式的帮助程序类。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.DataBindingHelper.EnsureDataBindingUpToDateOnMembers(System.Windows.DependencyObject)">
            <summary>
确保带绑定表达式的操作上的所有 DP 都是最新的。在数据绑定阶段将触发 DataTrigger。由于操作是触发器的子项,所以操作上的任何绑定可能不是最新的。在调用操作之前将调用此例程,以便保证所有绑定都是最新的,并且具有最新数据。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.DataBindingHelper.EnsureDataBindingOnActionsUpToDate(System.Windows.Interactivity.TriggerBase{System.Windows.DependencyObject})">
            <summary>
确保操作上的所有绑定表达式都是最新的
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.DataBindingHelper.EnsureBindingUpToDate(System.Windows.DependencyObject,System.Windows.DependencyProperty)">
            <summary>
此帮助程序函数可确保在依赖对象的依赖属性具有绑定表达式的情况下,绑定表达式是最新的。
            </summary>
            <param name="target"></param>
            <param name="dp"></param>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.DataStateBehavior">
            <summary>
根据条件语句在两种状态之间切换。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.DataStateBehavior.OnAttached">
            <summary>
在行为附加到 AssociatedObject 后调用。
            </summary>
<remarks>替代它以便将功能挂钩到 AssociatedObject。</remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.DataStateBehavior.IsElementLoaded(System.Windows.FrameworkElement)">
            <summary>
帮助程序函数,用来取代 FrameworkElement.IsLoaded,因为此属性在 Silverlight 中不可用。
            </summary>
<param name="element">所关注的元素。</param>
<returns>如果已加载元素,则返回 true;否则返回 false。</returns>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.DataStateBehavior.Binding">
            <summary>
获取或设置生成数据对象的属性值的绑定。这是依赖属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.DataStateBehavior.Value">
            <summary>
获取或设置要与数据对象的属性值进行比较的值。这是依赖属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.DataStateBehavior.TrueState">
            <summary>
获取或设置在满足条件时要过渡到的视觉状态的名称。这是依赖属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.DataStateBehavior.FalseState">
            <summary>
获取或设置在未满足条件时要过渡到的视觉状态的名称。这是依赖属性。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.DataStoreChangedTrigger">
            <summary>
旨在绑定到数据存储属性的触发器。在该属性更改时触发。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.PropertyChangedTrigger">
             <summary>
表示在绑定数据发生了更改时执行操作的触发器。
             </summary>
UA_REVIEW:chabiss
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.PropertyChangedTrigger.EvaluateBindingChange(System.Object)">
            <summary>
在绑定属性发生更改时调用。UA_REVIEW:chabiss
            </summary>
<param name="args"><see cref="T:System.Windows.DependencyPropertyChangedEventArgs"/> 参数。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.PropertyChangedTrigger.OnAttached">
            <summary>
在触发器附加到 AssociatedObject 后调用。UA_REVIEW:chabiss
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.PropertyChangedTrigger.OnDetaching">
            <summary>
在触发器与其 AssociatedObject 分离时(但在它实际发生之前)调用。UA_REVIEW:chabiss
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.PropertyChangedTrigger.Binding">
             <summary>
触发器将侦听的绑定对象,该对象发生更改时会导致触发器触发。
             </summary>
UA_REVIEW:chabiss
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.DataTrigger">
            <summary>
表示在绑定数据满足指定条件时执行操作的触发器。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.DataTrigger.EvaluateBindingChange(System.Object)">
            <summary>
在绑定属性发生更改时调用。UA_REVIEW:chabiss
            </summary>
<param name="args"><see cref="T:System.Windows.DependencyPropertyChangedEventArgs"/> 参数。</param>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.DataTrigger.Value">
            <summary>
获取或设置要与数据对象的属性值进行比较的值。这是依赖属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.DataTrigger.Comparison">
            <summary>
获取或设置要在指定值之间执行的比较的类型。这是依赖属性。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager">
            <summary>
ExtendedVisualStateManager 是自定义 VisualStateManager,可以使布局属性的动画变得平滑。利用此自定义 VisualStateManager,状态可以包含对属性(如 Grid.Column)的更改,可以将元素高度更改为 Auto 或从 Auto 更改为某个值,等等。将使用相应过渡的 GeneratedDuration 和 GeneratedEasingFunction 使这些更改随着时间推移而变得平滑。请参阅下面的"VisualStateManager 替代"区域以了解此算法的概述。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.UseFluidLayoutProperty">
            <summary>
一个可以使用或不可以使用 FluidLayout 的 VisualStateGroup。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.RuntimeVisibilityPropertyProperty">
            <summary>
可见性在运行时通过自定义的附加属性被隐藏。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.OriginalLayoutValuesProperty">
            <summary>
VisualStateGroup 在一个附加属性中保存这些原始值的列表。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.LayoutStoryboardProperty">
            <summary>
对于每种状态,会提取特定于布局的属性,然后将它们附加到状态。会从状态本身中删除这些属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.CurrentStateProperty">
            <summary>
记住当前状态。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.TransitionEffectProperty">
            <summary>
状态更改时要使用的 TransitionEffect。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.TransitionEffectStoryboardProperty">
            <summary>
在状态更改过程中使用的 TransitionEffectStoryboard。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.DidCacheBackgroundProperty">
            <summary>
在状态更改过程中使用的缓存背景。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.CachedBackgroundProperty">
            <summary>
在状态更改过程中使用的缓存背景。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.CachedEffectProperty">
            <summary>
在状态更改过程中使用的缓存背景。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.MovingElements">
            <summary>
这是当前在运动中的元素的集合。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.LayoutTransitionStoryboard">
            <summary>
这是正动态显示过渡的情节提要。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.LayoutProperties">
            <summary>
此列表包含所有已知的布局属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.PathToPropertyMap">
            <summary>
Silverlight 未提供直接从 PropertyPath 获取 DependencyProperty 的方法,因此,使用此结构来查找所跟踪的路径。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.StopAnimations">
            <summary>
停止动画,并替换为了支持该动画而做出的布局更改。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.FindTransition(System.Windows.VisualStateGroup,System.Windows.VisualState,System.Windows.VisualState)">
            <summary>
查找 VisualStateManager 将用于动态显示更改的过渡,以便布局动画可以匹配持续时间和缓动。
            </summary>
<param name="group">正在其中发生过渡的组。</param>
<param name="previousState">您的源状态。</param>
<param name="state">您的目标状态。</param>
<returns>过渡</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.ExtractLayoutStoryboard(System.Windows.VisualState)">
            <summary>
从状态的情节提要中删除所有影响布局的属性,然后将这些属性缓存到一个附加属性中。
            </summary>
<param name="state">您的目标状态。</param>
<returns>包含该状态下的布局属性的情节提要。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.FindTargetElements(System.Windows.FrameworkElement,System.Windows.FrameworkElement,System.Windows.Media.Animation.Storyboard,System.Collections.Generic.List{Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.OriginalLayoutValueRecord},System.Collections.Generic.List{System.Windows.FrameworkElement})">
            <summary>
目标元素的集合是指在布局过渡中可能已移动的所有元素的集合。此集合汇合了:- 具有在该状态下动态显示的布局属性的元素。- 集合中的元素的同级。- 集合中的元素的父级。

后续代码将在布局更改之前和之后检查这些矩形。
            </summary>
<param name="control">其布局正在改变状态的控件。</param>
<param name="layoutStoryboard">包含布局更改的情节提要。</param>
<param name="originalValueRecords">来自以前的状态导航(可能可以还原)的任何以前值。</param>
<param name="movingElements">当前在运动中的元素的集合(如果正在进行状态更改过渡的话)。</param>
<returns>其布局可能已更改的元素的完整集合。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.GetRectsOfTargets(System.Collections.Generic.List{System.Windows.FrameworkElement},System.Collections.Generic.List{System.Windows.FrameworkElement})">
            <summary>
获取目标列表中所有元素的矩形的集合。
            </summary>
<param name="targets">要考虑的元素的集合。</param>
<param name="movingElements">当前在运动中的元素的集合。</param>
<returns>将元素映射到其矩形的字典。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.GetLayoutRect(System.Windows.FrameworkElement)">
            <summary>
获取布局槽,然后算出正使用槽的哪个部分,从而获取元素的布局矩形。
            </summary>
<param name="element">将检索其布局矩形的元素。</param>
<returns>该元素的布局矩形。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.GetOldOpacities(System.Windows.FrameworkElement,System.Windows.FrameworkElement,System.Windows.Media.Animation.Storyboard,System.Collections.Generic.List{Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.OriginalLayoutValueRecord},System.Collections.Generic.List{System.Windows.FrameworkElement})">
            <summary>
获得在状态更改时元素的不透明度,而不是获得可见性,原因是状态更改可能在进行中,而且当前值最重要。
            </summary>
<param name="control">其状态正在更改的控件。</param>
<param name="layoutStoryboard">具有布局属性的情节提要。</param>
<param name="originalValueRecords">原始值的集合。</param>
            <returns></returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.SetLayoutStoryboardProperties(System.Windows.FrameworkElement,System.Windows.FrameworkElement,System.Windows.Media.Animation.Storyboard,System.Collections.Generic.List{Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.OriginalLayoutValueRecord})">
            <summary>
检查布局情节提要,并使用 SetValue 设置所有属性,以允许不标记时间线刻度就调用 UpdateLayout(这将导致呈现行为)。覆盖的所有值均将存储在 OriginalValueRecords 的集合中,因此,可以在以后替换这些值。
            </summary>
<param name="control">其状态正在更改的控件。</param>
<param name="layoutStoryboard">具有布局属性的情节提要。</param>
<param name="originalValueRecords">原始值的存储区。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.WrapMovingElementsInCanvases(System.Collections.Generic.List{System.Windows.FrameworkElement},System.Collections.Generic.Dictionary{System.Windows.FrameworkElement,System.Windows.Rect},System.Collections.Generic.Dictionary{System.Windows.FrameworkElement,System.Windows.Rect})">
            <summary>
获取由于布局动画的缘故而将会移动的所有元素,然后将它们包装在"画布"面板中,以便它们不会影响其同级元素。
            </summary>
<param name="movingElements">将会移动的元素的集合。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.UnwrapMovingElementsFromCanvases(System.Collections.Generic.List{System.Windows.FrameworkElement})">
            <summary>
获取由于布局动画的缘故而一直移动的所有元素,然后将它们从其"画布"面板中解包。
            </summary>
<param name="movingElements">一直移动的元素的集合。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.CopyLayoutProperties(System.Windows.FrameworkElement,System.Windows.FrameworkElement,System.Boolean)">
            <summary>
将布局属性从源元素复制到目标元素,并从源中清除这些属性。
            </summary>
<param name="source">布局属性的源。</param>
<param name="target">布局属性的目标。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.CreateLayoutTransitionStoryboard(System.Windows.VisualTransition,System.Collections.Generic.List{System.Windows.FrameworkElement},System.Collections.Generic.Dictionary{System.Windows.FrameworkElement,System.Double})">
            <summary>
创建将用于动态显示过渡的实际情节提要。使用所有以前计算的结果。
            </summary>
<param name="duration">动画的持续时间。</param>
<param name="ease">将在动画中使用的缓动函数。</param>
<param name="movingElements">将会移动的元素的集合。</param>
<param name="oldOpacities">其可见性属性正发生改变的元素的旧不透明度。</param>
<returns>情节提要。</returns>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.OriginalLayoutValueRecord">
            <summary>
OriginalValueRecord 会记住在某个状态下被更改的属性的原始值。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Layout.FluidMoveScope">
            <summary>
此枚举类型指示是将 FluidMoveBehavior 应用于它附加到的元素,还是应用于该元素的子元素。如果存在着行为方式特殊的单个元素,则"Self"很有用;如果相同的行为要应用于 WrapPanel 的所有子项或 ItemsControl 的 ItemsHost 面板,则"Children"很有用。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Layout.TagType">
            <summary>
此枚举的类型指明元素是自行标识还是通过其 DataContext 来标识。DataContext 标识允许从一个数据驱动的位置移动到另一个位置。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.AppliesToProperty">
            <summary>
与行为的范围对应的依赖属性。有关更多详细信息,请参阅 FluidMoveScope。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.IsActiveProperty">
            <summary>
与行为的活动状态对应的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.TagProperty">
            <summary>
依赖属性,能够将元素用作其自己的标记或元素绑定。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.TagPathProperty">
            <summary>
UsaBindingAsTag 为 true 时要添加到绑定的额外路径的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.IdentityTagProperty">
            <summary>
用于检测容器之间的元素运动的标识标记。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.AppliesTo">
            <summary>
指示行为是只应用于此元素,还是应用于此元素的所有子元素(如果此元素是面板的话)。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.IsActive">
            <summary>
指示行为当前是否处于活动状态。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.Tag">
            <summary>
指明是将元素用作其自己的标记,还是将元素绑定用作该标记。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.TagPath">
            <summary>
当指定 TagType 时要添加到绑定的额外路径。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Layout.FluidMoveBehaviorBase.TagData">
            <summary>
用于存储属于标记项目的所有相关数据的专用结构。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior">
            <summary>
一种行为,此行为监视一个或一组元素的布局更改,并在必要时将元素平滑地移到新位置。此行为并不动态显示元素的大小或可见性;它仅动态显示元素在其父容器中的偏移。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.DurationProperty">
            <summary>
与移动的持续时间对应的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.InitialTagProperty">
            <summary>
与即将加载对象时使用的标记类型相对应的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.InitialTagPathProperty">
            <summary>
UsaBindingAsTag 为 true 时要添加到绑定的额外路径的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.InitialIdentityTagProperty">
            <summary>
用于检测容器之间的元素运动的标识标记。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.FloatAboveProperty">
            <summary>
FloatAbove 标志的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.EaseXProperty">
            <summary>
与要用于移动的水平分量的 EasingFunction 对应的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.EaseYProperty">
            <summary>
与要用于移动的垂直分量的 EasingFunction 对应的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.OverlayProperty">
            <summary>
记住所使用的弹出菜单/修饰工具,以防 FloatAbove 为 true 时元素在容器间运动。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.CacheDuringOverlayProperty">
            <summary>
浮动弹出菜单时使用的不透明度高速缓存。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.HasTransformWrapperProperty">
            <summary>
标记动画转换。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.Duration">
            <summary>
移动的持续时间。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.InitialTag">
            <summary>
生成该项目的点。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.InitialTagPath">
            <summary>
当指定 TagType 时要添加到绑定的额外路径。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.FloatAbove">
            <summary>
一个指明更改容器时是否允许元素在其容器(在弹出菜单或修饰工具中)上方浮动的标志。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.EaseX">
            <summary>
用于移动的水平分量的 EasingFunction。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.FluidMoveBehavior.EaseY">
            <summary>
用于移动的垂直分量的 EasingFunction。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.GoToStateAction">
            <summary>
一项操作,它在被调用时会将 FrameworkElement 转换为指定的 VisualState。
            </summary>
            <remarks>
如果设置 TargetName 属性,则此操作将尝试更改目标元素的状态。否则,它将遍历元素树,以尝试查找定义状态的另一个目标。ControlTemplate 和 UserControl 是两种常见的可能性。
            </remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.GoToStateAction.OnTargetChanged(System.Windows.FrameworkElement,System.Windows.FrameworkElement)">
            <summary>
在目标更改时被调用。如果未设置 TargetName 属性,则此操作具有自定义行为。
            </summary>
            <param name="oldTarget"></param>
            <param name="newTarget"></param>
<exception cref="T:System.InvalidOperationException">无法找到具有状态的合适 FrameworkElement。</exception>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.GoToStateAction.Invoke(System.Object)">
            <summary>
在满足某些条件并且调用该操作时,会调用此方法。
            </summary>
            <param name="parameter"></param>
<exception cref="T:System.InvalidOperationException">无法将目标更改为指定的 StateName。</exception>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.GoToStateAction.UseTransitions">
            <summary>
确定是否使用 VisualTransition 在状态之间进行过渡。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.GoToStateAction.StateName">
            <summary>
VisualState 的名称。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.HyperlinkAction">
            <summary>
一项将导航到给定的超链接的操作。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.HyperlinkAction.Invoke(System.Object)">
            <summary>
在满足某些条件并且调用该操作时,会调用此方法。
            </summary>
            <param name="parameter"></param>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.HyperlinkAction.NavigateUri">
            <summary>
要打开的页面的 Uri。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.HyperlinkAction.TargetWindow">
            <summary>
应在其中打开 NavigateUri 的窗口或选项卡的名称。
            </summary>
            <remarks>
多个值具有特殊的含义:"_blank"表示将在新的浏览器窗口中加载,"_parent"表示将尝试在父框架中加载,而"_self"表示将以当前的页面或框架为目标。
            </remarks>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Input.KeyTrigger">
            <summary>
由键盘事件触发的触发器。如果检测到目标按键和修改键,它将触发。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Input.KeyTrigger.Key">
            <summary>
必须按下以便让触发器触发的按键。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Input.KeyTrigger.Modifiers">
            <summary>
必须处于活动状态以便让触发器触发的修改键(默认为未按下任何修改键)。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Input.KeyTrigger.FiredOn">
            <summary>
确定是否侦听 KeyDown 或 KeyUp 事件。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior">
            <summary>
重定位附加的元素,以响应鼠标在元素上的拖动姿势。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.XProperty">
            <summary>
与拖动的元素的 X 位置(相对于根元素的左侧)对应的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.YProperty">
            <summary>
与拖动的元素的 Y 位置(相对于根元素的顶部)对应的依赖属性。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.ConstrainToParentBoundsProperty">
            <summary>
与 ConstrainToParentBounds 属性对应的依赖属性。如果为 true,则拖动的元素将被约束为停留在其父容器的边界内。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.UpdatePosition(System.Windows.Point)">
            <summary>
尝试将关联元素的位置更新为指定的坐标。
            </summary>
<param name="point">在根坐标中所需的元素位置。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.ApplyTranslation(System.Double,System.Double)">
            <summary>
将相对位置转换应用于关联的元素。
            </summary>
<param name="x">所需的转换在根坐标中的 X 分量。</param>
<param name="y">所需的转换在根坐标中的 Y 分量。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.ApplyTranslationTransform(System.Double,System.Double)">
            <summary>
将给定的转换应用于关联元素的 RenderTransform。
            </summary>
<param name="x">转换在父坐标中的 X 分量。</param>
<param name="y">转换在父坐标中的 Y 分量。</param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.CloneTransform(System.Windows.Media.Transform)">
            <summary>
对指定的转换进行递归深层复制。
            </summary>
<param name="transform">要克隆的转换。</param>
<returns>指定的转换的深层复制,如果指定的转换为 null,则为 null。</returns>
<exception cref="T:System.ArgumentException">在不能识别转换类型的情况下引发。</exception>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.UpdatePosition">
            <summary>
根据当前呈现的关联元素位置更新 X 和 Y 属性。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.RectContainsRect(System.Windows.Rect,System.Windows.Rect)">
            <summary>
检查一个矩形是否包含另一个矩形。
            </summary>
<param name="rect1">包含另一个矩形的矩形。</param>
<param name="rect2">被包含的矩形。</param>
<returns>如果矩形 1 包含矩形 2,则为 <c>True</c>;否则为 <c>False</c>。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.TransformAsVector(System.Windows.Media.GeneralTransform,System.Double,System.Double)">
            <summary>
作为矢量转换。
            </summary>
<param name="transform">转换本身。</param>
<param name="x">矢量的 X 分量。</param>
<param name="y">矢量的 Y 分量。</param>
<returns>一个点,它包含被转换作为矢量转换的 X 和 Y 的值。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.GetTransformOffset(System.Windows.Media.GeneralTransform)">
            <summary>
获得转换偏移。
            </summary>
<param name="transform">转换本身。</param>
<returns>转换的偏移。</returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.OnAttached">
            <summary>
在行为附加到 AssociatedObject 后调用。
            </summary>
<remarks>替代它以便将功能挂钩到 AssociatedObject。</remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.OnDetaching">
            <summary>
在行为与其 AssociatedObject 分离时(但在它实际发生之前)调用。
            </summary>
<remarks>替代它以便将功能从 AssociatedObject 中解除挂钩。</remarks>
        </member>
        <member name="E:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.DragBegun">
            <summary>
在开始拖动姿势时发生。
            </summary>
        </member>
        <member name="E:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.Dragging">
            <summary>
在处理拖动姿势的更新时发生。
            </summary>
        </member>
        <member name="E:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.DragFinished">
            <summary>
在完成拖动姿势时发生。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.X">
            <summary>
获得或设置拖动的元素的 X 位置(相对于根元素的左侧)。这是依赖属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.Y">
            <summary>
获得或设置拖动的元素的 Y 位置(相对于根元素的顶部)。这是依赖属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.ConstrainToParentBounds">
            <summary>
获取或设置一个值,此值指示是否将拖动的元素约束为停留在其父容器的边界内。这是依赖属性。
            </summary>
            <value>
	如果应将拖动的元素约束为停留在其父容器的边界内,则为 <c>True</c>,否则为 <c>False</c>。
            </value>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.ActualPosition">
            <summary>
获取关联的元素在屏幕上的位置(在根坐标中)。
            </summary>
<value>关联的元素在屏幕上的位置(在根坐标中)。</value>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.ElementBounds">
            <summary>
获得在元素坐标中的元素边界。
            </summary>
<value>在元素坐标中的元素边界。</value>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.ParentElement">
            <summary>
获得关联对象的父元素。
            </summary>
<value>关联对象的父元素。</value>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.RootElement">
            <summary>
获得关联的对象所在的场景的根元素。
            </summary>
<value>关联的对象所在的场景的根元素。</value>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Layout.MouseDragElementBehavior.RenderTransform">
            <summary>
获取和设置关联的元素的 RenderTransform。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Media.PlaySoundAction">
            <summary>
一项将播放表示完成的声音的操作。
            </summary>
            <remarks>
此操作旨在与无需停止或控制的短暂声音效果配合使用。如果您尝试创建音乐播放器或游戏,它可能无法满足您的需求。
            </remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Media.PlaySoundAction.#ctor">
            <summary>
初始化 <see cref="T:Microsoft.Expression.Interactivity.Media.PlaySoundAction"/> 类的新实例。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Media.PlaySoundAction.SetMediaElementProperties(System.Windows.Controls.MediaElement)">
            <summary>
在调用该操作时,此方法用于自定义动态创建的 MediaElement。
            </summary>
            <remarks>
此方法对于想扩展 PlaySoundAction 的操作设计者可能很有用。如果您想控制 MediaElement Balance 属性,则可以从 PlaySoundAction 继承并替代此方法。
            </remarks>
            <param name="mediaElement"></param>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Media.PlaySoundAction.Invoke(System.Object)">
            <summary>
在满足一些条件并且应调用该操作时,会调用此方法。
            </summary>
            <remarks>
每次调用该操作都会播放新的声音。虽然此实现可能会有更改,但调用者应预计到这将创建新的 MediaElement,该元素在声音播放完毕或媒体未能播放时将被清除。
            </remarks>
            <param name="parameter"></param>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Media.PlaySoundAction.Source">
            <summary>
定义声音文件位置的 Uri。这用于设置 MediaElement 的源属性。这是依赖属性。
            </summary>
            <remarks>
声音可以是 MediaElement 支持的任何文件格式。对于视频,它将只播放音频部分。
            </remarks>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Media.PlaySoundAction.Volume">
            <summary>
控制音量。这用于设置 MediaElement 的 Volume 属性。这是依赖属性。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.RemoveElementAction">
            <summary>
一项操作,它在被调用时将从树中删除目标元素。
            </summary>
            <remarks>
此操作可能失败。此操作了解如何从公共父级中删除元素,但不了解如何从自定义集合中删除元素,也不了解可视化树的直接操作。
            </remarks>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.SetDataStoreValueAction">
            <summary>
一项将更改数据存储对象中的属性值的操作。此类与 ChangePropertyAction 相同。唯一的差别就是会为此操作加载数据存储选取器。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Media.StoryboardAction">
            <summary>
一个提供将情节提要确定为目标的能力的抽象类。
            </summary>
            <remarks>
对于操作设计者,此类提供将情节提要确定为目标的标准方法。设计工具可能会选择为从此操作继承的类提供特别的编辑体验,从而改善设计者的体验。
            </remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Media.StoryboardAction.OnStoryboardChanged(System.Windows.DependencyPropertyChangedEventArgs)">
            <summary>
在更改 Storyboard 属性时会调用此方法。
            </summary>
            <param name="args"></param>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Media.StoryboardAction.Storyboard">
            <summary>
目标情节提要。这是依赖属性。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Media.ControlStoryboardAction">
            <summary>
一项操作,它在被调用时将更改目标情节提要的状态。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Media.ControlStoryboardAction.Invoke(System.Object)">
            <summary>
在满足一些条件并且应调用该操作时,会调用此方法。此方法将尝试按照 ControlStoryboardOption 定义的方式更改目标情节提要。
            </summary>
            <param name="parameter"></param>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Media.StoryboardTrigger">
            <summary>
一个提供将情节提要确定为目标的能力的抽象类。
            </summary>
            <remarks>
对于触发器设计者,此类提供将情节提要确定为目标的标准方法。设计工具可能会选择为从此触发器继承的类提供特别的编辑体验,从而改善设计者的体验。
            </remarks>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Media.StoryboardTrigger.OnStoryboardChanged(System.Windows.DependencyPropertyChangedEventArgs)">
            <summary>
在更改 Storyboard 属性时会调用此方法。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Media.StoryboardTrigger.Storyboard">
            <summary>
目标情节提要。这是依赖属性。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Media.StoryboardCompletedTrigger">
            <summary>
侦听情节提要完成状态的触发器。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Media.StoryboardCompletedTrigger.#ctor">
            <summary>
初始化 <see cref="T:Microsoft.Expression.Interactivity.Media.StoryboardCompletedTrigger"/> 类的新实例。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.Core.TimerTrigger">
            <summary>
一个触发器,它由在其源上发生的指定事件触发,并且在触发该事件后延迟一段时间才触发。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.Core.TimerTrigger.#ctor">
            <summary>
初始化 <see cref="T:Microsoft.Expression.Interactivity.Core.TimerTrigger"/> 类的新实例。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.TimerTrigger.MillisecondsPerTick">
            <summary>
获得或设置在刻度线之间等待的毫秒数。这是依赖属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.Core.TimerTrigger.TotalTicks">
            <summary>
获取或设置在完成触发器之前要触发的刻度线总数。这是依赖属性。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Media.Effects.TransitionEffect">
            <summary>
定义一个过渡效果着色器,此着色器使用 0 与 1 之间的内插值从一个视觉对象过渡到另一个视觉对象。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Media.Effects.TransitionEffect.InputProperty">
            <summary>
转变为着色器中的取样器属性的画笔值属性。代表处于过渡的最终状态的图像。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Media.Effects.TransitionEffect.OldImageProperty">
            <summary>
转变为着色器中的取样器属性的画笔值属性。代表处于过渡的初始状态的图像。
            </summary>
        </member>
        <member name="F:Microsoft.Expression.Media.Effects.TransitionEffect.ProgressProperty">
            <summary>
与进度对应的作为后备存储的依赖属性。也用于表示从始到终的过渡的状态(范围介于 0 到 1 之间)。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Media.Effects.TransitionEffect.CloneCurrentValue">
            <summary>
使用 <see cref="T:TransitionEffect"/> 的当前值对其创建可修改的克隆(深层复制)。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Media.Effects.TransitionEffect.DeepCopy">
            <summary>
对过渡效果进行深层复制。在 Silverlight 中实现 CloneCurrentValue。
            </summary>
<returns>过渡效果的当前实例的克隆。</returns>
        </member>
        <member name="M:Microsoft.Expression.Media.Effects.TransitionEffect.#ctor">
            <summary>
将着色器的变量更新为默认值。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Media.Effects.TransitionEffect.Input">
            <summary>
获取或设置着色器内的 Input 变量。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Media.Effects.TransitionEffect.OldImage">
            <summary>
获取或设置着色器内的 OldImage 变量。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Media.Effects.TransitionEffect.Progress">
            <summary>
获取或设置着色器内的 Progress 变量。
            </summary>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.VisualStateUtilities">
            <summary>
此类为使用 VisualStateManager 提供各种平台不可知的标准操作。
            </summary>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.VisualStateUtilities.GoToState(System.Windows.FrameworkElement,System.String,System.Boolean)">
            <summary>
在控件的两种状态之间过渡。
            </summary>
<param name="element">要在状态之间进行过渡的元素。</param>
<param name="stateName">要过渡到的状态。</param>
<param name="useTransitions">如果要使用 System.Windows.VisualTransition 在状态之间进行过渡,则为 true;否则为 false。</param>
<returns>如果控件已成功过渡为新状态,则为 true;否则为 false。</returns>
<exception cref="T:System.ArgumentNullException">控件为 null。</exception>
<exception cref="T:System.ArgumentNullException">StateName 为 null。</exception>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.VisualStateUtilities.GetVisualStateGroups(System.Windows.FrameworkElement)">
            <summary>
获取 VisualStateManager.VisualStateGroups 附加属性的值。
            </summary>
<param name="targetObject">要从中获取 VisualStateManager.VisualStateGroups 的元素。</param>
            <returns></returns>
        </member>
        <member name="M:Microsoft.Expression.Interactivity.VisualStateUtilities.TryFindNearestStatefulControl(System.Windows.FrameworkElement,System.Windows.FrameworkElement@)">
            <summary>
查找包含可视状态的最近的父项。
            </summary>
<param name="contextElement">要从中查找最近的状态控件的元素。</param>
<param name="resolvedControl">如果为 true,则为最近的状态控件;否则为 null。</param>
<returns>如果父项包含可视状态,则为 true;否则为 false。</returns>
        </member>
        <member name="T:Microsoft.Expression.Interactivity.ExceptionStringTable">
            <summary>
强类型的资源类,用于查找本地化的字符串等。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.ResourceManager">
            <summary>
返回此类使用的已缓存 ResourceManager 实例。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.Culture">
            <summary>
为使用此强类型资源类进行的所有资源查找替代当前线程的 CurrentUICulture 属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.CallMethodActionValidMethodNotFoundExceptionMessage">
            <summary>
查找类似于以下内容且与预期签名匹配的本地化字符串:在类型"{1}"的对象上找不到名为"{0}"的方法。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.ChangePropertyActionAmbiguousAdditionOperationExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:在类型"{0}"上找到了多个可能的加法运算符。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.ChangePropertyActionCannotAnimateTargetTypeExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:无法针对类型为"{0}"的目标动态显示属性更改。只能针对从 DependencyObject 中派生的类型动态显示属性更改。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.ChangePropertyActionCannotFindPropertyNameExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:在类型"{1}"上找不到名为"{0}"的属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.ChangePropertyActionCannotIncrementAnimatedPropertyChangeExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:如果设置 Duration 属性,则无法将 Increment 属性设置为 True。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.ChangePropertyActionCannotIncrementWriteOnlyPropertyExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:属性"{0}"无法递增,因为无法读取其值。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.ChangePropertyActionCannotSetValueExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:无法将类型"{0}"的值分配到类型"{2}"的属性"{1}"。只能将类型"{2}"的值分配给"{1}"属性。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.ChangePropertyActionPropertyIsReadOnlyExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:类型"{1}"所定义的属性"{0}"不公开设置方法,因此无法修改。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.DataStateBehaviorStateNameNotFoundExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:在类型"{1}"上找不到名为"{0}"的状态。请确保该状态存在并且可以从此上下文中被访问。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.GoToStateActionTargetHasNoStateGroups">
            <summary>
查找类似于以下内容的本地化字符串:目标 {0} 不定义任何 VisualStateGroups。 .
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.InvalidLeftOperand">
            <summary>
查找类似于以下内容的本地化字符串:类型为"{0}"的 LeftOperand 无法与运算符"{1}"结合使用。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.InvalidOperands">
            <summary>
查找类似于以下内容的本地化字符串:类型为"{1}"的 LeftOperand 和类型为"{0}"的 RightOperand 无法与运算符"{2}"结合使用。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.InvalidRightOperand">
            <summary>
查找类似于以下内容的本地化字符串:类型为"{0}"的 RightOperand 无法与运算符"{1}"结合使用。
            </summary>
        </member>
        <member name="P:Microsoft.Expression.Interactivity.ExceptionStringTable.UnsupportedRemoveTargetExceptionMessage">
            <summary>
查找类似于以下内容的本地化字符串:不支持 RemoveElementAction 的目标。
            </summary>
        </member>
    </members>
</doc>


text:
author: Aniket
title: I am upgraded to v1.0
layout: post
type: post
category: weblog
tags:
  - Self-Improvement
---

After roughly three months of unexplainable inactivity and extreme learning experience, I feel that I can start working on core modules of many applications.

## Learning over the past few months

The only way I can support the above is by stating a couple of things that I have learnt in the past few months.
Here are some tips that you should focus on -

1.  Choose the best tool
2.  Use the capabilities of your framework
3.  Learn the language better you know best
4.  Rewrite old code and become better

## Crazy current situation

At present I have two options. One takes me back to an old project that I dumped because of lack of functionality in the framework. And the other option is to go for the same old project but instead of a the old framework, I can choose to go for a better one.

The first option will involve lots of code rewriting that I am thoroughly enjoying. But the other one will make my work simpler and will not let me face massive challenges.

But I think that I will ditch both and go for a complete new idea to work on. **And that is contributing to both the frameworks.**
As of now I know what I can do better and it seems like going for new ideas and working on the core will help me learn better. And along with all of that I will keep fiddling and dabbling with new stuff.

All of this seems so exciting and I am most probably going to stay this way for the next few months.

## Things on my list

*   **Shift to linux once again and run AOE III from the Virtual Box. (Because it seems so cool)**
*   Learn to work with micro-frameworks - specifically [Toro][1] because it's so cool too!
*   Write something for [A List Apart][2]
*   Work my way to another redesign that will not be so focused on development but be a mix of my personality and code
*   Do my best in organising [Mark My Word][3]

A shift from applications to the core should be good for me.

 [1]: http://toroweb.org/ "Toro: Micro-Framework"
 [2]: http://www.alistapart.com/ "A List Apart"
 [3]: http://markmyword.in "Mark My Word Conference"


text:
/*
 * This file is auto-generated.  DO NOT MODIFY.
 * Original file: E:\\workplace\\W_eclipse1_2\\AidlService\\src\\org\\crazyit\\service\\ICat.aidl
 */
package org.crazyit.service;
/**
 * Description:
 *
ÍøÕ¾: ·è¿ñJavaÁªÃË
 *
Copyright (C), 2001-2012, Yeeku.H.Lee
 *
This program is protected by copyright laws.
 *
Program Name:
 *
Date:
 * @author  Yeeku.H.Lee kongyeeku@163.com
 * @version  1.0
 */
public interface ICat extends android.os.IInterface
{
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements org.crazyit.service.ICat
{
private static final java.lang.String DESCRIPTOR = "org.crazyit.service.ICat";
/** Construct the stub at attach it to the interface. */
public Stub()
{
this.attachInterface(this, DESCRIPTOR);
}
/**
 * Cast an IBinder object into an org.crazyit.service.ICat interface,
 * generating a proxy if needed.
 */
public static org.crazyit.service.ICat asInterface(android.os.IBinder obj)
{
if ((obj==null)) {
return null;
}
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof org.crazyit.service.ICat))) {
return ((org.crazyit.service.ICat)iin);
}
return new org.crazyit.service.ICat.Stub.Proxy(obj);
}
@Override public android.os.IBinder asBinder()
{
return this;
}
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
switch (code)
{
case INTERFACE_TRANSACTION:
{
reply.writeString(DESCRIPTOR);
return true;
}
case TRANSACTION_getColor:
{
data.enforceInterface(DESCRIPTOR);
java.lang.String _result = this.getColor();
reply.writeNoException();
reply.writeString(_result);
return true;
}
case TRANSACTION_getWeight:
{
data.enforceInterface(DESCRIPTOR);
double _result = this.getWeight();
reply.writeNoException();
reply.writeDouble(_result);
return true;
}
}
return super.onTransact(code, data, reply, flags);
}
private static class Proxy implements org.crazyit.service.ICat
{
private android.os.IBinder mRemote;
Proxy(android.os.IBinder remote)
{
mRemote = remote;
}
@Override public android.os.IBinder asBinder()
{
return mRemote;
}
public java.lang.String getInterfaceDescriptor()
{
return DESCRIPTOR;
}
@Override public java.lang.String getColor() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
java.lang.String _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
mRemote.transact(Stub.TRANSACTION_getColor, _data, _reply, 0);
_reply.readException();
_result = _reply.readString();
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override public double getWeight() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
double _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
mRemote.transact(Stub.TRANSACTION_getWeight, _data, _reply, 0);
_reply.readException();
_result = _reply.readDouble();
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
}
static final int TRANSACTION_getColor = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
static final int TRANSACTION_getWeight = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
}
public java.lang.String getColor() throws android.os.RemoteException;
public double getWeight() throws android.os.RemoteException;
}


text:
/*
 * typedefs.cpp
 * ------------
 * Purpose: Basic data type definitions and assorted compiler-related helpers.
 * Notes  : (currently none)
 * Authors: OpenMPT Devs
 * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
 */

#include "stdafx.h"
#include "typedefs.h"
#include <iostream>
#include <cstring>

#if !defined(MODPLUG_TRACKER) && defined(MPT_ASSERT_HANDLER_NEEDED)

noinline void AssertHandler(const char *file, int line, const char *function, const char *expr, const char *msg)
//--------------------------------------------------------------------------------------------------------------
{
	if(msg)
	{
		Logger(file, line, function)("ASSERTION FAILED: %s (%s)", msg, expr);
	} else
	{
		Logger(file, line, function)("ASSERTION FAILED: %s", expr);
	}
}

#endif // !MODPLUG_TRACKER &&  MPT_ASSERT_HANDLER_NEEDED

//#define LOG_TO_FILE

static const std::size_t LOGBUF_SIZE = 1024;

#if defined(MODPLUG_TRACKER) && !defined(NO_LOGGING)

static uint64 GetTimeMS()
//-----------------------
{
	FILETIME filetime;
	GetSystemTimeAsFileTime(&filetime);
	return ((uint64)filetime.dwHighDateTime << 32 | filetime.dwLowDateTime) / 10000;
}

static std::string TimeAsAsString(uint64 ms)
//------------------------------------------
{

	FILETIME filetime;
	SYSTEMTIME systime;
	filetime.dwHighDateTime = (DWORD)(((uint64)ms * 10000) >> 32);
	filetime.dwLowDateTime = (DWORD)((uint64)ms * 10000);
	FileTimeToSystemTime(&filetime, &systime);

	std::string result;
	TCHAR buf[LOGBUF_SIZE];

	GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, &systime, "yyyy-MM-dd ", buf, LOGBUF_SIZE);
	result.append(buf);

	GetTimeFormat(LOCALE_SYSTEM_DEFAULT, TIME_FORCE24HOURFORMAT, &systime, "HH:mm:ss.", buf, LOGBUF_SIZE);
	result.append(buf);

	sprintf(buf, "%03u", (unsigned)systime.wMilliseconds);
	result.append(buf);

	return result;
}

static std::string TimeDiffAsString(uint64 ms)
//--------------------------------------------
{
	return mpt::fmt::dec<6>(ms);
}

static std::wstring TimeDiffAsStringW(uint64 ms)
//----------------------------------------------
{
	return mpt::wfmt::dec<6>(ms);
}

#endif // MODPLUG_TRACKER

static noinline void DoLog(const char *file, int line, const char *function, std::wstring message)
//------------------------------------------------------------------------------------------------
{
#if !defined(MODPLUG_TRACKER) || (defined(MODPLUG_TRACKER) && !defined(NO_LOGGING))
	if(!file)
	{
		file = "unknown";
	}
	if(!function)
	{
		function = "";
	}
	// remove eol if already present
	message = mpt::String::RTrim(message, L"\r\n");
	#if defined(MODPLUG_TRACKER)
		static uint64_t s_lastlogtime = 0;
		uint64 cur = GetTimeMS();
		uint64 diff = cur - s_lastlogtime;
		s_lastlogtime = cur;
		#ifdef LOG_TO_FILE
		{
			static FILE * s_logfile = nullptr;
			if(!s_logfile)
			{
				s_logfile = mpt_fopen(MPT_PATHSTRING("mptrack.log"), "a");
			}
			if(s_logfile)
			{
				fprintf(s_logfile, "%s+%s %s(%i): %s [%s]\n", TimeAsAsString(cur).c_str(), TimeDiffAsString(diff).c_str(), file, line, mpt::To(mpt::CharsetUTF8, message).c_str(), function);
				fflush(s_logfile);
			}
		}
		#endif // LOG_TO_FILE
		{
			OutputDebugStringW(mpt::String::PrintW(L"%1(%2): +%3 %4 [%5]\n", mpt::ToWide(mpt::CharsetASCII, file), line, TimeDiffAsStringW(diff), message, mpt::ToWide(mpt::CharsetASCII, function)).c_str());
		}
	#else // !MODPLUG_TRACKER
		std::clog
			<< "openmpt: "
			<< file << "(" << line << ")" << ": "
			<< mpt::ToLocale(message)
			<< " [" << function << "]"
			<< std::endl;
	#endif // MODPLUG_TRACKER
#else
	MPT_UNREFERENCED_PARAMETER(file);
	MPT_UNREFERENCED_PARAMETER(line);
	MPT_UNREFERENCED_PARAMETER(function);
	MPT_UNREFERENCED_PARAMETER(message);
#endif
}

static noinline void DoLog(const char *file, int line, const char *function, const char *format, va_list args)
//------------------------------------------------------------------------------------------------------------
{
#if !defined(MODPLUG_TRACKER) || (defined(MODPLUG_TRACKER) && !defined(NO_LOGGING))
	char message[LOGBUF_SIZE];
	va_list va;
	va_copy(va, args);
	vsnprintf(message, LOGBUF_SIZE, format, va);
	message[LOGBUF_SIZE - 1] = '\0';
	va_end(va);
	DoLog(file, line, function, mpt::ToWide(mpt::CharsetLocale, message));
#else
	MPT_UNREFERENCED_PARAMETER(file);
	MPT_UNREFERENCED_PARAMETER(line);
	MPT_UNREFERENCED_PARAMETER(function);
	MPT_UNREFERENCED_PARAMETER(format);
	MPT_UNREFERENCED_PARAMETER(args);
#endif
}

#ifndef NO_LOGGING

void Logger::operator () (const char *format, ...)
//------------------------------------------------
{
	va_list va;
	va_start(va, format);
	DoLog(file, line, function, format, va);
	va_end(va);
}
void Logger::operator () (const std::string &text)
//------------------------------------------------
{
	DoLog(file, line, function, mpt::ToWide(mpt::CharsetLocale, text));
}
void Logger::operator () (const std::wstring &text)
//-------------------------------------------------
{
	DoLog(file, line, function, text);
}

#undef Log
void Log(const char * format, ...)
//--------------------------------
{
	va_list va;
	va_start(va, format);
	DoLog(nullptr, 0, nullptr, format, va);
	va_end(va);
}
void Log(const std::string &text)
//-------------------------------
{
	DoLog(nullptr, 0, nullptr, mpt::ToWide(mpt::CharsetLocale, text));
}
void Log(const std::wstring &text)
//--------------------------------
{
	DoLog(nullptr, 0, nullptr, text);
}

#endif // !NO_LOGGING


text:
package net.iridgames.towerdefense.towers;

import java.util.List;

import org.newdawn.slick.geom.Point;

import net.iridgames.towerdefense.MathHelper;
import net.iridgames.towerdefense.monsters.Monster;
import net.iridgames.towerdefense.world.World;

public class TowerCannon extends Tower {

	private static final long serialVersionUID = -7467369134509181775L;

	public TowerCannon(World worldObj, float x, float y) {
		super(worldObj, x, y, 7.5f);
		this.setTime(1500);
		this.setTopLayer("sniper");
	}

	@Override
	public void attackMonsters(List<Monster> monsters) {
		float angle = MathHelper.getAngle(new Point(this.getCenterX(), this.getCenterY()),
				new Point(target.getCenterX(), target.getCenterY())) - 180;
		if ( !monsters.isEmpty() ) {
			worldObj.getProjectileList().add(new Object[] { (x + 0.5f) * i, (y + 0.5f) * i, angle, 5, 50, false });
			// monsters.get(0).dead = true;
		}
	}

}


text:
title: Self-hosted jobs on your computer or in cloud VMs
---

The new **Bring Your Own Cloud** (BYOC) feature enables you to run builds on your own infrastructure. Builds could be run inside VMs (**Azure, AWS, GCE, Hyper-V**), in **Docker** containers (Windows, Linux and macOS) or directly on the host (**Windows, Linux** and **macOS**). BYOC is available for hosted AppVeyor accounts and self-hosted AppVeyor Server installations.

## Use cases

* **Local testing** - connect your Windows or Mac development machine to AppVeyor and run build/tests there.
* **Custom build images** - build your own custom build VM images optimized for your needs. [Read more](/docs/byoc/#what-about-build-vm-images).
* **Custom VM sizes/types** - use servers or VMs with better/different characteristics (GPU-enabled, memory-, disk-, network-optimized).
* **Per-minute pricing** - Build VM is created for the duration of a build job and immediately deleted when this build is over. AWS, GCE and Azure have per-minute pricing so you pay for the "clean" build time only.
* **Security/compliance requirements** - the code or build artifacts not leaving particular cloud/region/zone/network.

## Advantages

While AppVeyor BYOC supports running builds on a host directly (aka "self-hosted agent") it really shines at running builds on dynamically provisioned VMs. Creating VMs on demand has a number of advantages:

* **Significant savings on a monthly cloud bill** - build VM is created for the duration of a build job and you pay for "clean" build time. "Self-hosted agent" is installed on VM running 24x7 and waiting for your builds.
* **Pristine environment for every build** - build VMs are provisioned from an image and never reused for the consequent builds. You get pristine environment for every build. "Self-hosted agent" runs builds directly on the host operating system thus pulluting it with leftovers.
* **Multiple parallelism**. A single build can be run on hundreds of VMs simoultanously for a shorter period of time. For example, you have a suite with 1,000 tests and it takes 1 hour on a single core to run them all. You can run the suite on 10 single-core VMs in parallel and reduce the overall test time to 6 minutes by paying the same amount to the cloud provider!

## Included in all accounts for free

We are excited to announce that we've enabled BYOC for all open-source and paid accounts and added **5 self-hosted jobs free of charge**.
Now you can run up to 5 self-hosted jobs simultaneously on your own computer or in your cloud VMs.

> Please note that charges for cloud VMs and other cloud resources will be applied directly to your cloud account bill.

## Getting started

To configure your own build environment select **Self-hosted jobs** in the top menu and click **Add cloud**. There is a wizard that will guide you through the process and give you commands based on your selection that should be run on your computer.

Read more about BYOC in our [docs](/docs/byoc/). Give it a try and let us know what you think!

Best regards,

AppVeyor team


text:
package org.microg.nlp.location;

import android.content.Context;
import android.location.Criteria;
import android.location.Location;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.os.WorkSource;
import android.util.Log;

import static android.location.LocationProvider.AVAILABLE;

public class LocationProviderV1 extends com.android.location.provider.LocationProvider
        implements LocationProvider {
    private static final String TAG = "NlpLocationProvider";

    private final ThreadHelper helper;
    private long autoTime = Long.MAX_VALUE;
    private boolean autoUpdate = false;

    public LocationProviderV1(Context context) {
        this.helper = new ThreadHelper(context, this);
    }

    @Override
    public void onDisable() {
        Log.d(TAG, "onDisable");
        helper.disable();
    }

    @Override
    public void reload() {
        helper.reload();
    }

    @Override
    public void onEnable() {
        Log.d(TAG, "onEnable");
    }

    @Override
    public boolean onRequiresNetwork() {
        return false;
    }

    @Override
    public boolean onRequiresSatellite() {
        return false;
    }

    @Override
    public boolean onRequiresCell() {
        return false;
    }

    @Override
    public boolean onHasMonetaryCost() {
        return false;
    }

    @Override
    public boolean onSupportsAltitude() {
        return true;
    }

    @Override
    public boolean onSupportsSpeed() {
        return true;
    }

    @Override
    public boolean onSupportsBearing() {
        return true;
    }

    @Override
    public int onGetPowerRequirement() {
        return Criteria.POWER_LOW;
    }

    @Override
    public boolean onMeetsCriteria(Criteria criteria) {
        if (criteria.getAccuracy() == Criteria.ACCURACY_FINE) {
            return false;
        }
        return true;
    }

    @Override
    public int onGetAccuracy() {
        return Criteria.ACCURACY_COARSE;
    }

    @Override
    public int onGetStatus(Bundle extras) {
        return AVAILABLE;
    }

    @Override
    public long onGetStatusUpdateTime() {
        return 0;
    }

    @Override
    public String onGetInternalState() {
        return null;
    }

    @Override
    public void onEnableLocationTracking(boolean enable) {
        Log.v(TAG, "onEnableLocationTracking: " + enable);
        autoUpdate = enable;
        if (autoUpdate && autoTime != Long.MAX_VALUE) helper.enable();
    }

    @Override
    public void onSetMinTime(long minTime, WorkSource ws) {
        Log.v(TAG, "onSetMinTime: " + minTime + " by " + ws);
        autoTime = Math.max(minTime, FASTEST_REFRESH_INTERVAL);
        helper.setTime(autoTime);
        if (autoUpdate) helper.enable();
    }

    @Override
    public void onUpdateNetworkState(int state, NetworkInfo info) {

    }

    @Override
    public void onUpdateLocation(Location location) {

    }

    @Override
    public boolean onSendExtraCommand(String command, Bundle extras) {
        return false;
    }

    @Override
    public void onAddListener(int uid, WorkSource ws) {

    }

    @Override
    public void onRemoveListener(int uid, WorkSource ws) {

    }

    @Override
    public void destroy() {
        helper.destroy();
    }
}


text:
from ..errors import InvalidEnumValue
from ..items import DELETE_TYPE_CHOICES
from ..util import create_element
from .common import EWSAccountService, folder_ids_element

class EmptyFolder(EWSAccountService):
    """MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/emptyfolder-operation"""

    SERVICE_NAME = "EmptyFolder"
    returns_elements = False

    def call(self, folders, delete_type, delete_sub_folders):
        if delete_type not in DELETE_TYPE_CHOICES:
            raise InvalidEnumValue("delete_type", delete_type, DELETE_TYPE_CHOICES)
        return self._chunked_get_elements(
            self.get_payload, items=folders, delete_type=delete_type, delete_sub_folders=delete_sub_folders
        )

    def get_payload(self, folders, delete_type, delete_sub_folders):
        payload = create_element(
            f"m:{self.SERVICE_NAME}", attrs=dict(DeleteType=delete_type, DeleteSubFolders=delete_sub_folders)
        )
        payload.append(folder_ids_element(folders=folders, version=self.account.version))
        return payload


text:
package stroom.data.store.api;

import java.io.InputStream;

public abstract class SizeAwareInputStream extends InputStream {

    /**
     * Get the size in bytes of the input stream.
     *
     * @return The size in bytes of the input stream.
     */
    public abstract long size();
}


text:
require 'RMagick'
module Technoweenie # :nodoc:
  module AttachmentFu # :nodoc:
    module Processors
      module RmagickProcessor
        def self.included(base)
          base.send :extend, ClassMethods
          base.alias_method_chain :process_attachment, :processing
        end

        module ClassMethods
          # Yields a block containing an RMagick Image for the given binary data.
          def with_image(file, &block)
            begin
              binary_data = file.is_a?(Magick::Image) ? file : Magick::Image.read(file).first unless !Object.const_defined?(:Magick)
            rescue
              # Log the failure to load the image.  This should match ::Magick::ImageMagickError
              # but that would cause acts_as_attachment to require rmagick.
              logger.debug("Exception working with image: #{$!}")
              binary_data = nil
            end
            block.call binary_data if block && binary_data
          ensure
            !binary_data.nil?
          end
        end

      protected
        def process_attachment_with_processing
          return unless process_attachment_without_processing
          with_image do |img|
            resize_image_or_thumbnail! img
            self.width  = img.columns if respond_to?(:width)
            self.height = img.rows    if respond_to?(:height)
            callback_with_args :after_resize, img
          end if image?
        end

        # Performs the actual resizing operation for a thumbnail
        def resize_image(img, size)
          size = size.first if size.is_a?(Array) && size.length == 1 && !size.first.is_a?(Fixnum)
          if size.is_a?(Fixnum) || (size.is_a?(Array) && size.first.is_a?(Fixnum))
            size = [size, size] if size.is_a?(Fixnum)
            img.thumbnail!(*size)
          elsif size.is_a?(String) && size =~ /^c.*$/ # Image cropping - example geometry string: c75x75
            dimensions = size[1..size.size].split("x")
            img.crop_resized!(dimensions[0].to_i, dimensions[1].to_i)
          else
            img.change_geometry(size.to_s) { |cols, rows, image| image.resize!(cols<1 ? 1 : cols, rows<1 ? 1 : rows) }
          end
          img.strip! unless attachment_options[:keep_profile]
          temp_paths.unshift write_to_temp_file(img.to_blob)
        end
      end
    end
  end
end


text:
package v1beta1

import (
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	watch "k8s.io/apimachinery/pkg/watch"
	rest "k8s.io/client-go/rest"
	v1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1"
	scheme "k8s.io/metrics/pkg/client/clientset_generated/clientset/scheme"
)

// PodMetricsesGetter has a method to return a PodMetricsInterface.
// A group's client should implement this interface.
type PodMetricsesGetter interface {
	PodMetricses(namespace string) PodMetricsInterface
}

// PodMetricsInterface has methods to work with PodMetrics resources.
type PodMetricsInterface interface {
	Get(name string, options v1.GetOptions) (*v1beta1.PodMetrics, error)
	List(opts v1.ListOptions) (*v1beta1.PodMetricsList, error)
	Watch(opts v1.ListOptions) (watch.Interface, error)
	PodMetricsExpansion
}

// podMetricses implements PodMetricsInterface
type podMetricses struct {
	client rest.Interface
	ns     string
}

// newPodMetricses returns a PodMetricses
func newPodMetricses(c *MetricsV1beta1Client, namespace string) *podMetricses {
	return &podMetricses{
		client: c.RESTClient(),
		ns:     namespace,
	}
}

// Get takes name of the podMetrics, and returns the corresponding podMetrics object, and an error if there is any.
func (c *podMetricses) Get(name string, options v1.GetOptions) (result *v1beta1.PodMetrics, err error) {
	result = &v1beta1.PodMetrics{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("pods").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}

// List takes label and field selectors, and returns the list of PodMetricses that match those selectors.
func (c *podMetricses) List(opts v1.ListOptions) (result *v1beta1.PodMetricsList, err error) {
	result = &v1beta1.PodMetricsList{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("pods").
		VersionedParams(&opts, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}

// Watch returns a watch.Interface that watches the requested podMetricses.
func (c *podMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) {
	opts.Watch = true
	return c.client.Get().
		Namespace(c.ns).
		Resource("pods").
		VersionedParams(&opts, scheme.ParameterCodec).
		Watch()
}


text:
import { useRouter } from "next/router";
import { Component } from "./component";

export const AdminPages = () => {
  const { pathname } = useRouter();

  const pages = [
    { href: "/music-providers/admin", text: "MusicProviders" },
    { href: "/tracks/admin", text: "Tracks" },
    { href: "/track-genres/admin", text: "TrackGenres" },
    { href: "/playlists/admin", text: "Playlists" },
    { href: "/countries/admin", text: "Countries" },
    { href: "/labels/admin", text: "Labels" },
    { href: "/label-tags/admin", text: "LabelTags" },
    { href: "/stores/admin", text: "Stores" },
    { href: "/store-tags/admin", text: "StoreTags" },
    { href: "/bookmarks/admin", text: "Bookmarks" },
    { href: "/bookmark-tags/admin", text: "BookmarkTags" },
  ];

  const label =
    pages.find(({ href }) => pathname.split("/")[1] === href.split("/")[1])
      ?.text || "Pages";

  return <Component pages={pages} label={label} />;
};


text:
require 'fileutils'

class ServersList
  @debug = false

  def self.add_server(hostname, username, password)
    if File.open(SERVERS_FILE_PATH, 'a+').grep(/#{hostname}/).empty?
      File.write(SERVERS_FILE_PATH,
                 "#{hostname} #{username} #{password}\n",
                 File.size(SERVERS_FILE_PATH), mode: 'a')
    else
      raise "server #{hostname} already exists"
    end
  end

  def self.remove_server(hostname)
    File.open("#{SERVERS_FILE_PATH}.tmp", 'w') do |out_file|
      File.foreach(SERVERS_FILE_PATH) do |line|
        out_file.puts line unless line.match /#{hostname}/
      end
    end

    FileUtils.mv("#{SERVERS_FILE_PATH}.tmp", SERVERS_FILE_PATH)
  end

  def self.each_server
    servers = File.open('servers', 'r')

    while (server = servers.gets)
      server = server.split(' ')

      yield(server)
    end
  end

  def self.get_server(hostname)
    File.open(SERVERS_FILE_PATH, 'a+').grep(/#{hostname}/)[0].split
  end

  def self.list_servers
    puts "Servers list [hostname] [username]\n\n"

    self.each_server do |server|
      puts "#{server[0]} #{server[1]}"
    end
  end

  def self.turn_debug_on
    @debug = true
  end
end


text:
import logging

__LOG = None

def do_log():
    """
    Should we log?
    """
    global __LOG
    if __LOG is None:
        return False
    else:
        return True

def log_message(message):
    """
    Logs a message to the logger.
    """

    if do_log():
        __LOG.debug(message)
    return

def setup_logger(log_file=None):
    """
    Set a log file to log messages to. Useful for debugging.

    :param log_file: A file to log to.
    :type log_file: str
    """
    global __LOG

    if log_file is not None:
        __LOG = logging.getLogger('pytx')
        __LOG.setLevel(logging.DEBUG)
        fh = logging.FileHandler(log_file)
        fh.setLevel(logging.DEBUG)
        formatter = logging.Formatter(
            '%(asctime)s : %(name)s : %(levelname)s : %(message)s'
        )
        fh.setFormatter(formatter)
        __LOG.addHandler(fh)


text:
ACCEPTED

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

#### Published in
in Samson & Pitt (eds), Advances in Penicillium and Aspergillus Systematics (New York) 422 (1986)

#### Original name
Penicilliopsis dybowskii Pat., 1892

### Remarks
null


text:
"""List of renames to apply when converting from TF 1.0 to TF 2.0.

THIS FILE IS AUTOGENERATED: To update, please run:
  bazel build tensorflow/tools/compatibility/update:generate_v2_renames_map
  bazel-bin/tensorflow/tools/compatibility/update/generate_v2_renames_map
This file should be updated whenever endpoints are deprecated.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

renames = {
    'tf.acos': 'tf.math.acos',
    'tf.acosh': 'tf.math.acosh',
    'tf.add': 'tf.math.add',
    'tf.as_string': 'tf.dtypes.as_string',
    'tf.asin': 'tf.math.asin',
    'tf.asinh': 'tf.math.asinh',
    'tf.atan': 'tf.math.atan',
    'tf.atan2': 'tf.math.atan2',
    'tf.atanh': 'tf.math.atanh',
    'tf.batch_to_space_nd': 'tf.manip.batch_to_space_nd',
    'tf.betainc': 'tf.math.betainc',
    'tf.ceil': 'tf.math.ceil',
    'tf.check_numerics': 'tf.debugging.check_numerics',
    'tf.cholesky': 'tf.linalg.cholesky',
    'tf.cos': 'tf.math.cos',
    'tf.cosh': 'tf.math.cosh',
    'tf.cross': 'tf.linalg.cross',
    'tf.decode_base64': 'tf.io.decode_base64',
    'tf.decode_compressed': 'tf.io.decode_compressed',
    'tf.decode_json_example': 'tf.io.decode_json_example',
    'tf.decode_raw': 'tf.io.decode_raw',
    'tf.dequantize': 'tf.quantization.dequantize',
    'tf.diag': 'tf.linalg.tensor_diag',
    'tf.diag_part': 'tf.linalg.tensor_diag_part',
    'tf.digamma': 'tf.math.digamma',
    'tf.encode_base64': 'tf.io.encode_base64',
    'tf.equal': 'tf.math.equal',
    'tf.erfc': 'tf.math.erfc',
    'tf.exp': 'tf.math.exp',
    'tf.expm1': 'tf.math.expm1',
    'tf.extract_image_patches': 'tf.image.extract_image_patches',
    'tf.fake_quant_with_min_max_args': 'tf.quantization.fake_quant_with_min_max_args',
    'tf.fake_quant_with_min_max_args_gradient': 'tf.quantization.fake_quant_with_min_max_args_gradient',
    'tf.fake_quant_with_min_max_vars': 'tf.quantization.fake_quant_with_min_max_vars',
    'tf.fake_quant_with_min_max_vars_gradient': 'tf.quantization.fake_quant_with_min_max_vars_gradient',
    'tf.fake_quant_with_min_max_vars_per_channel': 'tf.quantization.fake_quant_with_min_max_vars_per_channel',
    'tf.fake_quant_with_min_max_vars_per_channel_gradient': 'tf.quantization.fake_quant_with_min_max_vars_per_channel_gradient',
    'tf.fft': 'tf.spectral.fft',
    'tf.floor': 'tf.math.floor',
    'tf.gather_nd': 'tf.manip.gather_nd',
    'tf.GraphKeys.VARIABLES': 'tf.GraphKeys.GLOBAL_VARIABLES',
    'tf.greater': 'tf.math.greater',
    'tf.greater_equal': 'tf.math.greater_equal',
    'tf.ifft': 'tf.spectral.ifft',
    'tf.igamma': 'tf.math.igamma',
    'tf.igammac': 'tf.math.igammac',
    'tf.invert_permutation': 'tf.math.invert_permutation',
    'tf.is_finite': 'tf.debugging.is_finite',
    'tf.is_inf': 'tf.debugging.is_inf',
    'tf.is_nan': 'tf.debugging.is_nan',
    'tf.less': 'tf.math.less',
    'tf.less_equal': 'tf.math.less_equal',
    'tf.lgamma': 'tf.math.lgamma',
    'tf.log': 'tf.math.log',
    'tf.log1p': 'tf.math.log1p',
    'tf.logical_and': 'tf.math.logical_and',
    'tf.logical_not': 'tf.math.logical_not',
    'tf.logical_or': 'tf.math.logical_or',
    'tf.matching_files': 'tf.io.matching_files',
    'tf.matrix_band_part': 'tf.linalg.band_part',
    'tf.matrix_determinant': 'tf.linalg.det',
    'tf.matrix_diag': 'tf.linalg.diag',
    'tf.matrix_diag_part': 'tf.linalg.diag_part',
    'tf.matrix_inverse': 'tf.linalg.inv',
    'tf.matrix_set_diag': 'tf.linalg.set_diag',
    'tf.matrix_solve': 'tf.linalg.solve',
    'tf.matrix_triangular_solve': 'tf.linalg.triangular_solve',
    'tf.maximum': 'tf.math.maximum',
    'tf.minimum': 'tf.math.minimum',
    'tf.not_equal': 'tf.math.not_equal',
    'tf.parse_tensor': 'tf.io.parse_tensor',
    'tf.polygamma': 'tf.math.polygamma',
    'tf.qr': 'tf.linalg.qr',
    'tf.quantized_concat': 'tf.quantization.quantized_concat',
    'tf.read_file': 'tf.io.read_file',
    'tf.reciprocal': 'tf.math.reciprocal',
    'tf.regex_replace': 'tf.strings.regex_replace',
    'tf.reshape': 'tf.manip.reshape',
    'tf.reverse': 'tf.manip.reverse',
    'tf.reverse_v2': 'tf.manip.reverse',
    'tf.rint': 'tf.math.rint',
    'tf.rsqrt': 'tf.math.rsqrt',
    'tf.scatter_nd': 'tf.manip.scatter_nd',
    'tf.segment_max': 'tf.math.segment_max',
    'tf.segment_mean': 'tf.math.segment_mean',
    'tf.segment_min': 'tf.math.segment_min',
    'tf.segment_prod': 'tf.math.segment_prod',
    'tf.segment_sum': 'tf.math.segment_sum',
    'tf.sin': 'tf.math.sin',
    'tf.sinh': 'tf.math.sinh',
    'tf.space_to_batch_nd': 'tf.manip.space_to_batch_nd',
    'tf.squared_difference': 'tf.math.squared_difference',
    'tf.string_join': 'tf.strings.join',
    'tf.string_strip': 'tf.strings.strip',
    'tf.string_to_hash_bucket': 'tf.strings.to_hash_bucket',
    'tf.string_to_hash_bucket_fast': 'tf.strings.to_hash_bucket_fast',
    'tf.string_to_hash_bucket_strong': 'tf.strings.to_hash_bucket_strong',
    'tf.string_to_number': 'tf.strings.to_number',
    'tf.substr': 'tf.strings.substr',
    'tf.tan': 'tf.math.tan',
    'tf.tile': 'tf.manip.tile',
    'tf.unsorted_segment_max': 'tf.math.unsorted_segment_max',
    'tf.unsorted_segment_min': 'tf.math.unsorted_segment_min',
    'tf.unsorted_segment_prod': 'tf.math.unsorted_segment_prod',
    'tf.unsorted_segment_sum': 'tf.math.unsorted_segment_sum',
    'tf.write_file': 'tf.io.write_file',
    'tf.zeta': 'tf.math.zeta'
}


text:
aws_setup "filler string" do
	action :setup_mediator_disk
end


text:
require 'test_helper'

class ScopeTest < ActiveSupport::TestCase
  setup do
    @fail = fails :fail_franco_user
  end

  test 'should return a fail within the date range' do
    @fail.update_attribute 'created_at', 1.year.ago

    start_range_at  = I18n.l 1.year.ago - 2.hours, format: :compact
    end_range_at    = I18n.l 1.year.ago + 2.hours, format: :compact
    range_as_string = "#{start_range_at} - #{end_range_at}"

    assert_equal 1, Fail.by_date(range_as_string).count
  end

  test 'should not return a fail within the date range' do
    @fail.update_attribute 'created_at', 1.year.ago

    start_range_at  = I18n.l 1.year.ago + 2.hours, format: :compact
    end_range_at    = I18n.l 1.year.ago + 4.hours, format: :compact
    range_as_string = "#{start_range_at} - #{end_range_at}"

    assert_equal 0, Fail.by_date(range_as_string).count
  end

  test 'should return a fail with like username' do
    username_to_upper = @fail.user.username.upcase

    assert_equal 1, Fail.by_user(username_to_upper[0..2]).count
  end

  test 'should not return a fail with like username' do
    assert_equal 0, Fail.by_user('UKN').count
  end
end