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

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

    #region Component Designer generated code

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
      this.components = new System.ComponentModel.Container();
      Wisej.Web.Label FirstNameLabel;
      Wisej.Web.Label IdLabel;
      Wisej.Web.Label LastNameLabel;
      this.CloseButton = new Wisej.Web.Button();
      this.ApplyButton = new Wisej.Web.Button();
      this.Cancel_Button = new Wisej.Web.Button();
      this.OKButton = new Wisej.Web.Button();
      this.GroupBox1 = new Wisej.Web.GroupBox();
      this.AssignmentsDataGridView = new Wisej.Web.DataGridView();
      this.projectIdDataGridViewTextBoxColumn = new Wisej.Web.DataGridViewTextBoxColumn();
      this.projectNameDataGridViewTextBoxColumn = new Wisej.Web.DataGridViewLinkColumn();
      this.assignedDataGridViewTextBoxColumn = new Wisej.Web.DataGridViewTextBoxColumn();
      this.Role = new Wisej.Web.DataGridViewComboBoxColumn();
      this.RoleListBindingSource = new Wisej.Web.BindingSource(this.components);
      this.AssignmentsBindingSource = new Wisej.Web.BindingSource(this.components);
      this.ResourceBindingSource = new Wisej.Web.BindingSource(this.components);
      this.UnassignButton = new Wisej.Web.Button();
      this.AssignButton = new Wisej.Web.Button();
      this.FirstNameTextBox = new Wisej.Web.TextBox();
      this.IdLabel1 = new Wisej.Web.Label();
      this.LastNameTextBox = new Wisej.Web.TextBox();
      this.ErrorProvider1 = new Wisej.Web.ErrorProvider(this.components);
      this.ReadWriteAuthorization1 = new CslaContrib.WisejWeb.ReadWriteAuthorization(this.components);
      this.RefreshButton = new Wisej.Web.Button();
      FirstNameLabel = new Wisej.Web.Label();
      IdLabel = new Wisej.Web.Label();
      LastNameLabel = new Wisej.Web.Label();
      this.GroupBox1.SuspendLayout();
      ((System.ComponentModel.ISupportInitialize)(this.AssignmentsDataGridView)).BeginInit();
      ((System.ComponentModel.ISupportInitialize)(this.RoleListBindingSource)).BeginInit();
      ((System.ComponentModel.ISupportInitialize)(this.AssignmentsBindingSource)).BeginInit();
      ((System.ComponentModel.ISupportInitialize)(this.ResourceBindingSource)).BeginInit();
      ((System.ComponentModel.ISupportInitialize)(this.ErrorProvider1)).BeginInit();
      this.SuspendLayout();
      //
      // FirstNameLabel
      //
      this.ReadWriteAuthorization1.SetApplyAuthorization(FirstNameLabel, false);
      FirstNameLabel.AutoSize = true;
      FirstNameLabel.Location = new System.Drawing.Point(13, 42);
      FirstNameLabel.Name = "FirstNameLabel";
      FirstNameLabel.Size = new System.Drawing.Size(63, 14);
      FirstNameLabel.TabIndex = 2;
      FirstNameLabel.Text = "First Name:";
      //
      // IdLabel
      //
      this.ReadWriteAuthorization1.SetApplyAuthorization(IdLabel, false);
      IdLabel.AutoSize = true;
      IdLabel.Location = new System.Drawing.Point(13, 13);
      IdLabel.Name = "IdLabel";
      IdLabel.Size = new System.Drawing.Size(21, 14);
      IdLabel.TabIndex = 0;
      IdLabel.Text = "Id:";
      //
      // LastNameLabel
      //
      this.ReadWriteAuthorization1.SetApplyAuthorization(LastNameLabel, false);
      LastNameLabel.AutoSize = true;
      LastNameLabel.Location = new System.Drawing.Point(13, 68);
      LastNameLabel.Name = "LastNameLabel";
      LastNameLabel.Size = new System.Drawing.Size(62, 14);
      LastNameLabel.TabIndex = 4;
      LastNameLabel.Text = "Last Name:";
      //
      // CloseButton
      //
      this.CloseButton.Anchor = ((Wisej.Web.AnchorStyles)((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.CloseButton, false);
      this.CloseButton.DialogResult = Wisej.Web.DialogResult.Cancel;
      this.CloseButton.Location = new System.Drawing.Point(814, 100);
      this.CloseButton.Name = "CloseButton";
      this.CloseButton.Size = new System.Drawing.Size(75, 23);
      this.CloseButton.TabIndex = 10;
      this.CloseButton.Text = "Close";
      this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click);
      //
      // ApplyButton
      //
      this.ApplyButton.Anchor = ((Wisej.Web.AnchorStyles)((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.ApplyButton, false);
      this.ApplyButton.DialogResult = Wisej.Web.DialogResult.Cancel;
      this.ApplyButton.Location = new System.Drawing.Point(814, 42);
      this.ApplyButton.Name = "ApplyButton";
      this.ApplyButton.Size = new System.Drawing.Size(75, 23);
      this.ApplyButton.TabIndex = 8;
      this.ApplyButton.Text = "Apply";
      this.ApplyButton.Click += new System.EventHandler(this.ApplyButton_Click);
      //
      // Cancel_Button
      //
      this.Cancel_Button.Anchor = ((Wisej.Web.AnchorStyles)((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.Cancel_Button, false);
      this.Cancel_Button.DialogResult = Wisej.Web.DialogResult.Cancel;
      this.Cancel_Button.Location = new System.Drawing.Point(814, 71);
      this.Cancel_Button.Name = "Cancel_Button";
      this.Cancel_Button.Size = new System.Drawing.Size(75, 23);
      this.Cancel_Button.TabIndex = 9;
      this.Cancel_Button.Text = "Cancel";
      this.Cancel_Button.Click += new System.EventHandler(this.Cancel_Button_Click);
      //
      // OKButton
      //
      this.OKButton.Anchor = ((Wisej.Web.AnchorStyles)((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.OKButton, false);
      this.OKButton.Location = new System.Drawing.Point(814, 13);
      this.OKButton.Name = "OKButton";
      this.OKButton.Size = new System.Drawing.Size(75, 23);
      this.OKButton.TabIndex = 7;
      this.OKButton.Text = "OK";
      this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
      //
      // GroupBox1
      //
      this.GroupBox1.Anchor = ((Wisej.Web.AnchorStyles)((((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Bottom)
            | Wisej.Web.AnchorStyles.Left)
            | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.GroupBox1, false);
      this.GroupBox1.Controls.Add(this.AssignmentsDataGridView);
      this.GroupBox1.Controls.Add(this.UnassignButton);
      this.GroupBox1.Controls.Add(this.AssignButton);
      this.GroupBox1.Location = new System.Drawing.Point(16, 91);
      this.GroupBox1.Name = "GroupBox1";
      this.GroupBox1.Size = new System.Drawing.Size(762, 310);
      this.GroupBox1.TabIndex = 6;
      this.GroupBox1.Text = "Assigned projects";
      //
      // AssignmentsDataGridView
      //
      this.AssignmentsDataGridView.Anchor = ((Wisej.Web.AnchorStyles)((((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Bottom)
            | Wisej.Web.AnchorStyles.Left)
            | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.AssignmentsDataGridView, true);
      this.AssignmentsDataGridView.AutoGenerateColumns = false;
      this.AssignmentsDataGridView.AutoSizeColumnsMode = Wisej.Web.DataGridViewAutoSizeColumnsMode.AllCells;
      this.AssignmentsDataGridView.Columns.AddRange(new Wisej.Web.DataGridViewColumn[] {
            this.projectIdDataGridViewTextBoxColumn,
            this.projectNameDataGridViewTextBoxColumn,
            this.assignedDataGridViewTextBoxColumn,
            this.Role});
      this.AssignmentsDataGridView.DataSource = this.AssignmentsBindingSource;
      this.AssignmentsDataGridView.Location = new System.Drawing.Point(6, 19);
      this.AssignmentsDataGridView.MultiSelect = false;
      this.AssignmentsDataGridView.Name = "AssignmentsDataGridView";
      this.AssignmentsDataGridView.RowHeadersVisible = false;
      this.AssignmentsDataGridView.SelectionMode = Wisej.Web.DataGridViewSelectionMode.FullRowSelect;
      this.AssignmentsDataGridView.ShowColumnVisibilityMenu = false;
      this.AssignmentsDataGridView.Size = new System.Drawing.Size(669, 285);
      this.AssignmentsDataGridView.TabIndex = 0;
      this.AssignmentsDataGridView.CellClick += new Wisej.Web.DataGridViewCellEventHandler(this.AssignmentsDataGridView_CellContentClick);
      //
      // projectIdDataGridViewTextBoxColumn
      //
      this.projectIdDataGridViewTextBoxColumn.DataPropertyName = "ProjectId";
      this.projectIdDataGridViewTextBoxColumn.HeaderText = "ProjectId";
      this.projectIdDataGridViewTextBoxColumn.Name = "projectIdDataGridViewTextBoxColumn";
      this.projectIdDataGridViewTextBoxColumn.ReadOnly = true;
      this.projectIdDataGridViewTextBoxColumn.ValueType = typeof(int);
      this.projectIdDataGridViewTextBoxColumn.Visible = false;
      this.projectIdDataGridViewTextBoxColumn.Width = 74;
      //
      // projectNameDataGridViewTextBoxColumn
      //
      this.projectNameDataGridViewTextBoxColumn.AutoSizeMode = Wisej.Web.DataGridViewAutoSizeColumnMode.Fill;
      this.projectNameDataGridViewTextBoxColumn.DataPropertyName = "ProjectName";
      this.projectNameDataGridViewTextBoxColumn.FillWeight = 200F;
      this.projectNameDataGridViewTextBoxColumn.HeaderText = "Project Name";
      this.projectNameDataGridViewTextBoxColumn.MinimumWidth = 100;
      this.projectNameDataGridViewTextBoxColumn.Name = "projectNameDataGridViewTextBoxColumn";
      this.projectNameDataGridViewTextBoxColumn.ReadOnly = true;
      this.projectNameDataGridViewTextBoxColumn.Resizable = Wisej.Web.DataGridViewTriState.True;
      this.projectNameDataGridViewTextBoxColumn.SortMode = Wisej.Web.DataGridViewColumnSortMode.Automatic;
      this.projectNameDataGridViewTextBoxColumn.Text = "";
      this.projectNameDataGridViewTextBoxColumn.ValueType = typeof(string);
      this.projectNameDataGridViewTextBoxColumn.Width = 200;
      //
      // assignedDataGridViewTextBoxColumn
      //
      this.assignedDataGridViewTextBoxColumn.DataPropertyName = "Assigned";
      this.assignedDataGridViewTextBoxColumn.HeaderText = "Assigned";
      this.assignedDataGridViewTextBoxColumn.MinimumWidth = 50;
      this.assignedDataGridViewTextBoxColumn.Name = "assignedDataGridViewTextBoxColumn";
      this.assignedDataGridViewTextBoxColumn.ReadOnly = true;
      this.assignedDataGridViewTextBoxColumn.ValueType = typeof(string);
      //
      // Role
      //
      this.Role.DataPropertyName = "Role";
      this.Role.DataSource = this.RoleListBindingSource;
      this.Role.DisplayMember = "Value";
      this.Role.DropDownStyle = Wisej.Web.ComboBoxStyle.DropDownList;
      this.Role.FillWeight = 200F;
      this.Role.HeaderText = "Role";
      this.Role.MinimumWidth = 100;
      this.Role.Name = "Role";
      this.Role.ValueMember = "Key";
      this.Role.ValueType = typeof(int);
      this.Role.Width = 200;
      //
      // RoleListBindingSource
      //
      this.RoleListBindingSource.DataSource = typeof(ProjectTracker.Library.RoleList);
      //
      // AssignmentsBindingSource
      //
      this.AssignmentsBindingSource.DataMember = "Assignments";
      this.AssignmentsBindingSource.DataSource = this.ResourceBindingSource;
      //
      // ResourceBindingSource
      //
      this.ResourceBindingSource.DataSource = typeof(ProjectTracker.Library.ResourceEdit);
      this.ResourceBindingSource.RefreshValueOnChange = true;
      //
      // UnassignButton
      //
      this.UnassignButton.Anchor = ((Wisej.Web.AnchorStyles)((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.UnassignButton, false);
      this.UnassignButton.Location = new System.Drawing.Point(681, 48);
      this.UnassignButton.Name = "UnassignButton";
      this.UnassignButton.Size = new System.Drawing.Size(75, 23);
      this.UnassignButton.TabIndex = 2;
      this.UnassignButton.Text = "Unassign";
      this.UnassignButton.Click += new System.EventHandler(this.UnassignButton_Click);
      //
      // AssignButton
      //
      this.AssignButton.Anchor = ((Wisej.Web.AnchorStyles)((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.AssignButton, false);
      this.AssignButton.Location = new System.Drawing.Point(681, 19);
      this.AssignButton.Name = "AssignButton";
      this.AssignButton.Size = new System.Drawing.Size(75, 23);
      this.AssignButton.TabIndex = 1;
      this.AssignButton.Text = "Assign";
      this.AssignButton.Click += new System.EventHandler(this.AssignButton_Click);
      //
      // FirstNameTextBox
      //
      this.FirstNameTextBox.Anchor = ((Wisej.Web.AnchorStyles)(((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Left)
            | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.FirstNameTextBox, true);
      this.FirstNameTextBox.DataBindings.Add(new Wisej.Web.Binding("Text", this.ResourceBindingSource, "FirstName", true));
      this.FirstNameTextBox.Location = new System.Drawing.Point(80, 39);
      this.FirstNameTextBox.Name = "FirstNameTextBox";
      this.FirstNameTextBox.Size = new System.Drawing.Size(698, 20);
      this.FirstNameTextBox.TabIndex = 3;
      //
      // IdLabel1
      //
      this.IdLabel1.Anchor = ((Wisej.Web.AnchorStyles)(((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Left)
            | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.IdLabel1, true);
      this.IdLabel1.DataBindings.Add(new Wisej.Web.Binding("Text", this.ResourceBindingSource, "Id", true));
      this.IdLabel1.Location = new System.Drawing.Point(80, 13);
      this.IdLabel1.Name = "IdLabel1";
      this.IdLabel1.Size = new System.Drawing.Size(698, 23);
      this.IdLabel1.TabIndex = 1;
      //
      // LastNameTextBox
      //
      this.LastNameTextBox.Anchor = ((Wisej.Web.AnchorStyles)(((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Left)
            | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.LastNameTextBox, true);
      this.LastNameTextBox.DataBindings.Add(new Wisej.Web.Binding("Text", this.ResourceBindingSource, "LastName", true));
      this.LastNameTextBox.Location = new System.Drawing.Point(80, 65);
      this.LastNameTextBox.Name = "LastNameTextBox";
      this.LastNameTextBox.Size = new System.Drawing.Size(698, 20);
      this.LastNameTextBox.TabIndex = 5;
      //
      // ErrorProvider1
      //
      this.ErrorProvider1.BlinkStyle = Wisej.Web.ErrorBlinkStyle.NeverBlink;
      this.ErrorProvider1.ContainerControl = this;
      this.ErrorProvider1.DataSource = this.ResourceBindingSource;
      //
      // RefreshButton
      //
      this.RefreshButton.Anchor = ((Wisej.Web.AnchorStyles)((Wisej.Web.AnchorStyles.Top | Wisej.Web.AnchorStyles.Right)));
      this.ReadWriteAuthorization1.SetApplyAuthorization(this.RefreshButton, false);
      this.RefreshButton.Location = new System.Drawing.Point(814, 129);
      this.RefreshButton.Name = "RefreshButton";
      this.RefreshButton.Size = new System.Drawing.Size(75, 23);
      this.RefreshButton.TabIndex = 11;
      this.RefreshButton.Text = "Refresh";
      this.RefreshButton.Click += new System.EventHandler(this.RefreshButton_Click);
      //
      // ResourceEdit
      //
      this.ReadWriteAuthorization1.SetApplyAuthorization(this, false);
      this.Controls.Add(this.RefreshButton);
      this.Controls.Add(this.CloseButton);
      this.Controls.Add(this.ApplyButton);
      this.Controls.Add(this.Cancel_Button);
      this.Controls.Add(this.OKButton);
      this.Controls.Add(this.GroupBox1);
      this.Controls.Add(FirstNameLabel);
      this.Controls.Add(this.FirstNameTextBox);
      this.Controls.Add(IdLabel);
      this.Controls.Add(this.IdLabel1);
      this.Controls.Add(LastNameLabel);
      this.Controls.Add(this.LastNameTextBox);
      this.Name = "ResourceEdit";
      this.Size = new System.Drawing.Size(901, 431);
      this.Load += new System.EventHandler(this.ResourceEdit_Load);
      this.GroupBox1.ResumeLayout(false);
      ((System.ComponentModel.ISupportInitialize)(this.AssignmentsDataGridView)).EndInit();
      ((System.ComponentModel.ISupportInitialize)(this.RoleListBindingSource)).EndInit();
      ((System.ComponentModel.ISupportInitialize)(this.AssignmentsBindingSource)).EndInit();
      ((System.ComponentModel.ISupportInitialize)(this.ResourceBindingSource)).EndInit();
      ((System.ComponentModel.ISupportInitialize)(this.ErrorProvider1)).EndInit();
      this.ResumeLayout(false);
      this.PerformLayout();

    }

    #endregion

    internal Wisej.Web.Button CloseButton;
    internal Wisej.Web.Button ApplyButton;
    internal Wisej.Web.Button Cancel_Button;
    internal Wisej.Web.Button OKButton;
    internal Wisej.Web.GroupBox GroupBox1;
    internal Wisej.Web.Button UnassignButton;
    internal Wisej.Web.Button AssignButton;
    internal Wisej.Web.TextBox FirstNameTextBox;
    internal Wisej.Web.Label IdLabel1;
    internal Wisej.Web.TextBox LastNameTextBox;
    internal CslaContrib.WisejWeb.ReadWriteAuthorization ReadWriteAuthorization1;
    internal Wisej.Web.DataGridView AssignmentsDataGridView;
    internal Wisej.Web.BindingSource RoleListBindingSource;
    internal Wisej.Web.BindingSource AssignmentsBindingSource;
    internal Wisej.Web.BindingSource ResourceBindingSource;
    internal Wisej.Web.ErrorProvider ErrorProvider1;
    private Wisej.Web.DataGridViewTextBoxColumn projectIdDataGridViewTextBoxColumn;
    private Wisej.Web.DataGridViewLinkColumn projectNameDataGridViewTextBoxColumn;
    private Wisej.Web.DataGridViewTextBoxColumn assignedDataGridViewTextBoxColumn;
    private Wisej.Web.DataGridViewComboBoxColumn Role;
    internal Wisej.Web.Button RefreshButton;
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<regress-exe>
  <test>
    <default>
      <files>dummy.js</files>
      <baseline>dummy.baseline</baseline>
      <custom-config-file>standard.testconfig</custom-config-file>
    </default>
  </test>
  <test>
    <default>
      <files>dummy.js</files>
      <baseline>dummy.baseline</baseline>
      <custom-config-file>leadingwhitespace.testconfig</custom-config-file>
    </default>
  </test>
  <test>
    <default>
      <files>dummy.js</files>
      <baseline>dummy.baseline</baseline>
      <custom-config-file>interspersednewline.testconfig</custom-config-file>
    </default>
  </test>
  <test>
    <default>
      <files>dummy.js</files>
      <baseline>dummy.baseline</baseline>
      <custom-config-file>interspersednewline_whitespace.testconfig</custom-config-file>
    </default>
  </test>
  <test>
    <default>
      <files>dummy.js</files>
      <baseline>dummy.baseline</baseline>
      <custom-config-file>interspersednewline_leadingwhitespace.testconfig</custom-config-file>
    </default>
  </test>
</regress-exe>

redpajama_set_name: RedPajamaGithub


text:
//------------------------------------------------------------------------------
// <copyright file="RequiredFieldValidator.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

/*
 */

namespace System.Web.UI.WebControls {

    using System.ComponentModel;
    using System.Web;
    using System.Web.Util;

    /// <devdoc>
    ///    <para> Checks if the value of
    ///       the associated input control is different from its initial value.</para>
    /// </devdoc>
    [
    ToolboxData("<{0}:RequiredFieldValidator runat=\"server\" ErrorMessage=\"RequiredFieldValidator\"></{0}:RequiredFieldValidator>")
    ]
    public class RequiredFieldValidator : BaseValidator {

        /// <devdoc>
        ///    <para>Gets or sets the initial value of the associated input control.</para>
        /// </devdoc>
        [
        WebCategory("Behavior"),
        Themeable(false),
        DefaultValue(""),
        WebSysDescription(SR.RequiredFieldValidator_InitialValue)
        ]
        public string InitialValue {
            get {
                object o = ViewState["InitialValue"];
                return((o == null) ? String.Empty : (string)o);
            }
            set {
                ViewState["InitialValue"] = value;
            }
        }

        /// <internalonly/>
        /// <devdoc>
        ///    AddAttributesToRender method
        /// </devdoc>
        protected override void AddAttributesToRender(HtmlTextWriter writer) {
            base.AddAttributesToRender(writer);
            if (RenderUplevel) {
                string id = ClientID;
                HtmlTextWriter expandoAttributeWriter = (EnableLegacyRendering || IsUnobtrusive) ? writer : null;
                AddExpandoAttribute(expandoAttributeWriter, id, "evaluationfunction", "RequiredFieldValidatorEvaluateIsValid", false);
                AddExpandoAttribute(expandoAttributeWriter, id, "initialvalue", InitialValue);
            }
        }

        /// <internalonly/>
        /// <devdoc>
        ///    EvaluateIsValid method
        /// </devdoc>
        protected override bool EvaluateIsValid() {

            // Get the control value, return true if it is not found
            string controlValue = GetControlValidationValue(ControlToValidate);
            if (controlValue == null) {
                Debug.Fail("Should have been caught by PropertiesValid check");
                return true;
            }

            // See if the control has changed
            return(!controlValue.Trim().Equals(InitialValue.Trim()));
        }
    }
}


text:
class RecordReviewers < ActiveRecord::Migration
  def self.up
    add_column :names, :reviewer_id, :integer, :default => nil, :null => true
    add_column :names, :last_review, :datetime
    add_column :images, :reviewer_id, :integer, :default => nil, :null => true
  end

  def self.down
    remove_column :names, :reviewer_id
    remove_column :names, :last_review
    remove_column :images, :reviewer_id
  end
end


text:
namespace v8 {
namespace internal {

CompilationInfo::CompilationInfo(Zone* zone, ParseInfo* parse_info,
                                 FunctionLiteral* literal)
    : CompilationInfo({}, AbstractCode::INTERPRETED_FUNCTION, zone) {
  // NOTE: The parse_info passed here represents the global information gathered
  // during parsing, but does not represent specific details of the actual
  // function literal being compiled for this CompilationInfo. As such,
  // parse_info->literal() might be different from literal, and only global
  // details of the script being parsed are relevant to this CompilationInfo.
  DCHECK_NOT_NULL(literal);
  literal_ = literal;
  source_range_map_ = parse_info->source_range_map();

  if (parse_info->is_eval()) MarkAsEval();
  if (parse_info->is_native()) MarkAsNative();
  if (parse_info->collect_type_profile()) MarkAsCollectTypeProfile();
}

CompilationInfo::CompilationInfo(Zone* zone, Isolate* isolate,
                                 Handle<SharedFunctionInfo> shared,
                                 Handle<JSFunction> closure)
    : CompilationInfo({}, AbstractCode::OPTIMIZED_FUNCTION, zone) {
  shared_info_ = shared;
  closure_ = closure;
  optimization_id_ = isolate->NextOptimizationId();
  dependencies_.reset(new CompilationDependencies(isolate, zone));

  if (FLAG_function_context_specialization) MarkAsFunctionContextSpecializing();
  if (FLAG_turbo_splitting) MarkAsSplittingEnabled();
  if (!FLAG_turbo_disable_switch_jump_table) SetFlag(kSwitchJumpTableEnabled);
  if (FLAG_untrusted_code_mitigations) MarkAsPoisoningRegisterArguments();

  // Collect source positions for optimized code when profiling or if debugger
  // is active, to be able to get more precise source positions at the price of
  // more memory consumption.
  if (isolate->NeedsSourcePositionsForProfiling()) {
    MarkAsSourcePositionsEnabled();
  }
}

CompilationInfo::CompilationInfo(Vector<const char> debug_name, Zone* zone,
                                 Code::Kind code_kind)
    : CompilationInfo(debug_name, static_cast<AbstractCode::Kind>(code_kind),
                      zone) {
  if (code_kind == Code::BYTECODE_HANDLER && has_untrusted_code_mitigations()) {
    SetFlag(CompilationInfo::kGenerateSpeculationPoisonOnEntry);
  }
}

CompilationInfo::CompilationInfo(Vector<const char> debug_name,
                                 AbstractCode::Kind code_kind, Zone* zone)
    : literal_(nullptr),
      source_range_map_(nullptr),
      flags_(FLAG_untrusted_code_mitigations ? kUntrustedCodeMitigations : 0),
      code_kind_(code_kind),
      stub_key_(0),
      builtin_index_(Builtins::kNoBuiltinId),
      osr_offset_(BailoutId::None()),
      feedback_vector_spec_(zone),
      zone_(zone),
      deferred_handles_(nullptr),
      dependencies_(nullptr),
      bailout_reason_(BailoutReason::kNoReason),
      optimization_id_(-1),
      debug_name_(debug_name) {}

CompilationInfo::~CompilationInfo() {
  if (GetFlag(kDisableFutureOptimization) && has_shared_info()) {
    shared_info()->DisableOptimization(bailout_reason());
  }
  if (dependencies()) {
    dependencies()->Rollback();
  }
}

DeclarationScope* CompilationInfo::scope() const {
  DCHECK_NOT_NULL(literal_);
  return literal_->scope();
}

int CompilationInfo::num_parameters() const {
  DCHECK(!IsStub());
  return scope()->num_parameters();
}

int CompilationInfo::num_parameters_including_this() const {
  DCHECK(!IsStub());
  return scope()->num_parameters() + 1;
}

void CompilationInfo::set_deferred_handles(
    std::shared_ptr<DeferredHandles> deferred_handles) {
  DCHECK_NULL(deferred_handles_);
  deferred_handles_.swap(deferred_handles);
}

void CompilationInfo::set_deferred_handles(DeferredHandles* deferred_handles) {
  DCHECK_NULL(deferred_handles_);
  deferred_handles_.reset(deferred_handles);
}

void CompilationInfo::ReopenHandlesInNewHandleScope() {
  if (!shared_info_.is_null()) {
    shared_info_ = Handle<SharedFunctionInfo>(*shared_info_);
  }
  if (!closure_.is_null()) {
    closure_ = Handle<JSFunction>(*closure_);
  }
}

bool CompilationInfo::has_simple_parameters() {
  return scope()->has_simple_parameters();
}

std::unique_ptr<char[]> CompilationInfo::GetDebugName() const {
  if (literal()) {
    return literal()->GetDebugName();
  }
  if (!shared_info().is_null()) {
    return shared_info()->DebugName()->ToCString();
  }
  Vector<const char> name_vec = debug_name_;
  if (name_vec.is_empty()) name_vec = ArrayVector("unknown");
  std::unique_ptr<char[]> name(new char[name_vec.length() + 1]);
  memcpy(name.get(), name_vec.start(), name_vec.length());
  name[name_vec.length()] = '\0';
  return name;
}

StackFrame::Type CompilationInfo::GetOutputStackFrameType() const {
  switch (code_kind()) {
    case Code::STUB:
    case Code::BYTECODE_HANDLER:
    case Code::BUILTIN:
      return StackFrame::STUB;
    case Code::WASM_FUNCTION:
      return StackFrame::WASM_COMPILED;
    case Code::JS_TO_WASM_FUNCTION:
      return StackFrame::JS_TO_WASM;
    case Code::WASM_TO_WASM_FUNCTION:
      return StackFrame::WASM_TO_WASM;
    case Code::WASM_TO_JS_FUNCTION:
      return StackFrame::WASM_TO_JS;
    case Code::WASM_INTERPRETER_ENTRY:
      return StackFrame::WASM_INTERPRETER_ENTRY;
    default:
      UNIMPLEMENTED();
      return StackFrame::NONE;
  }
}

int CompilationInfo::GetDeclareGlobalsFlags() const {
  return DeclareGlobalsEvalFlag::encode(is_eval()) |
         DeclareGlobalsNativeFlag::encode(is_native());
}

SourcePositionTableBuilder::RecordingMode
CompilationInfo::SourcePositionRecordingMode() const {
  return is_native() ? SourcePositionTableBuilder::OMIT_SOURCE_POSITIONS
                     : SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS;
}

bool CompilationInfo::has_context() const { return !closure().is_null(); }

Context* CompilationInfo::context() const {
  return has_context() ? closure()->context() : nullptr;
}

bool CompilationInfo::has_native_context() const {
  return !closure().is_null() && (closure()->native_context() != nullptr);
}

Context* CompilationInfo::native_context() const {
  return has_native_context() ? closure()->native_context() : nullptr;
}

bool CompilationInfo::has_global_object() const { return has_native_context(); }

JSGlobalObject* CompilationInfo::global_object() const {
  return has_global_object() ? native_context()->global_object() : nullptr;
}

int CompilationInfo::AddInlinedFunction(
    Handle<SharedFunctionInfo> inlined_function, SourcePosition pos) {
  int id = static_cast<int>(inlined_functions_.size());
  inlined_functions_.push_back(InlinedFunctionHolder(inlined_function, pos));
  return id;
}

}  // namespace internal
}  // namespace v8


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package xmlviewer;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Phystem
 */
public class RecentItems {

    private final static File RECENT = new File("Recent.txt");

    public static File[][] getRecentItems() {
        List<File[]> files = new ArrayList<>();

        if (RECENT.exists()) {
            try (Scanner scanner = new Scanner(RECENT)) {
                while (scanner.hasNextLine()) {
                    String val = scanner.nextLine();
                    File file = new File(val.split(";")[0]);
                    File xsd = null;
                    if (val.split(";").length > 1) {
                        xsd = new File(val.split(";")[1]);
                    }
                    if (file.exists()) {
                        File[] x = new File[2];
                        x[0] = file;
                        x[1] = xsd;
                        files.add(x);
                    }
                }
            } catch (FileNotFoundException ex) {
                Logger.getLogger(RecentItems.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return files.toArray(new File[][]{});
    }

    public static void storeRecentItems(List<File[]> files) {
        try (PrintWriter out = new PrintWriter(RECENT)) {
            for (File[] file : files) {
                String val = file[0].getAbsolutePath() + ";";
                if (file[1] != null) {
                    val += file[1].getAbsolutePath();
                }
                out.println(val);
            }
        } catch (FileNotFoundException ex) {
            Logger.getLogger(RecentItems.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}


text:
Simple utility for fetching weather data in JSON format using FMI open data

## Usage

1. Get api token for FMI
1. Save api token in config.json `{ "apiKey": "abcde" }` or environment variable `FMI_APIKEY`
1. `npm start`

## Available queries

### Simple forecast

Weather forecast fetched to a specific location.

#### Parameters

* __place__, location for the forecast

### Latest observations

Real time weather observations from weather stations for the last 12 hours.

#### Parameters

* __place__, location for the observations


text:
import { TestBed, inject } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { NgxNotifierService } from 'ngx-notifier';

import { AuthGuardService } from './auth-guard.service';

// modules
import { HttpClientModule } from '@angular/common/http';

// shared services
import { AuthService } from '../service/auth.service';

describe('AuthGuardService', () => {
  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [AuthGuardService, AuthService, NgxNotifierService],
      imports: [RouterTestingModule, HttpClientModule]
    });
  });

  it('should ...', inject([AuthGuardService], (service: AuthGuardService) => {
    expect(service).toBeTruthy();
  }));
});


text:
from django.conf import settings
from rest_framework.settings import APISettings

USER_SETTINGS = getattr(settings, 'REST_AUTH', None)

DEFAULTS = {
    'PASSWORD_MIN_LENGTH': 8,
    'USERNAME_MIN_LENGTH': 4,
    'EMAIL_VALIDATE_DOMAIN': True
}

# List of settings that may be in string import notation.
IMPORT_STRINGS = ()

api_settings = APISettings(USER_SETTINGS, DEFAULTS, IMPORT_STRINGS)


text:
'use strict';

const Vue = require('vue');
const {router} = require('./router');

module.exports = new Vue({router}).$mount('#app');


text:
<?php

use \Carbon\Carbon;
$order_time = Carbon::createFromTimeStamp($order->time)->format('d.m.Y H:i:s');

// ticket list
$tickets_valid = [];
$tickets_revoked = [];
$total = 0;
foreach ($order->tickets as $ticket) {
    if (!$ticket->is_valid) continue;
    if ($ticket->is_revoked) {
        $tickets_revoked[] = $ticket;
        continue;
    }
    $tickets_valid[] = $ticket;
    $total += $ticket->ticketgroup->price + $ticket->ticketgroup->fee;
}

// only add payment info to email if there is only one valid payment and it is a online/web payment
// if any tickets are revoked, we assume the order has been changed and should not contain payment info
$payment = null;
if (count($tickets_revoked) == 0) {
    $payments = $order->payments()->where('amount', '!=', 0)->get();
    if (count($payments) == 1 && $payments[0]->status == 'ACCEPTED') {
        $payment = $payments[0];
    }
}

echo
'Hei,

Takk for at du har kjøpt billetter hos UKA på Blindern. Her er billettene
dine og kjøpskvittering.

BILLETTINFORMASJON:
-------------------
Som vedlegg til denne e-posten ligger det ett PDF-dokument med dine billetter
som hver inneholder en strekkode. Disse billettene skriver du ut og tar med
til arrangementet. Hver billett og tilhørende strekkode kan kun benyttes én
gang.

Billettene bør skrives ut i 100 % størrelse og ikke fylle hele A4-arket.

Billettene kan også fremvises direkte på mobiltelefonen ved inngangen,
og er tilpasset dette formålet.

BEKREFTELSE PÅ KJØP (KVITTERING):
---------------------------------
Navn: '.$order->name.'
E-post: '.$order->email.'
Telefon: '.$order->phone.($order->recruiter ? '
Vervet av: '.$order->recruiter : '').'
';

if ($payment) {
    echo '
Transaksjonsnummer: ' . $payment->transaction_id;
}

echo '
Ordrenummer: '.$order->order_text_id.'
Kjøpstidspunkt: '.$order_time.'

Billettspesifikasjon:';

foreach ($tickets_valid as $ticket) {
    $time = Carbon::createFromTimeStamp($ticket->event->time_start)->format('d.m.Y H:i');

    $price = format_nok($ticket->ticketgroup->price+$ticket->ticketgroup->fee);
    if ($ticket->ticketgroup->fee) $price .= ', hvorav '.format_nok($ticket->ticketgroup->fee).' i billettgebyr';

    echo '
  '.$time.': '.$ticket->event->title.': '.$ticket->ticketgroup->title.' ('.$price.') (#'.$ticket->number.')';
}

if (count($tickets_revoked) > 0) {
    echo '

Billetter som er trukket tilbake (til informasjon):';

    foreach ($tickets_revoked as $ticket) {
        $time = Carbon::createFromTimeStamp($ticket->event->time_start)->format('d.m.Y H:i');

        echo '
  '.$time.': '.$ticket->event->title.': '.$ticket->ticketgroup->title.' (#'.$ticket->number.')';
    }
}

echo '

Merverdiavgift: '.format_nok(0).'
Totalbeløp: '.format_nok($total).($payment ? ' har blitt belastet ditt kort' : '').'

SPØRSMÅL/PROBLEMER:
-------------------
Se vår nettside eller ta kontakt:
http://blindernuka.no/
billett@blindernuka.no

Vi håper du får en flott opplevelse på UKA på Blindern!

--
UKA på Blindern
Foreningen Blindern Studenterhjem
http://blindernuka.no/

Dette billettsystemet har vi utviklet som fri programvare og er fritt tilgjengelig,
se https://github.com/blindernuka/billett';


text:
package org.apache.manifoldcf.agents.output.opensearchserver;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;

import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.HttpEntity;
import org.apache.http.message.BasicHeader;
import org.apache.http.Header;
import org.apache.http.util.EntityUtils;

import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.apache.manifoldcf.core.common.Base64;
import org.apache.manifoldcf.core.interfaces.ManifoldCFException;

public class OpenSearchServerIndex extends OpenSearchServerConnection {

  private static class IndexRequestEntity implements HttpEntity {

    private String documentURI;

    private InputStream inputStream;

    private String fileName;

    public IndexRequestEntity(String documentURI, InputStream inputStream) {
      this.documentURI = documentURI;
      this.inputStream = inputStream;
      this.fileName = FilenameUtils.getName(documentURI);
    }

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

    @Override
    public void consumeContent()
      throws IOException {
      EntityUtils.consume(this);
    }

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

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

    @Override
    public InputStream getContent()
      throws IOException, IllegalStateException {
      return inputStream;
    }

    @Override
    public void writeTo(OutputStream out)
      throws IOException {
      PrintWriter pw = new PrintWriter(out);
      try {
        pw.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
        pw.println("<index>);");
        pw.print("<document><field name=\"uri\"><value>");
        pw.print(documentURI);
        pw.println("</value></field>");
        pw.print("<binary fileName=\"");
        pw.print(fileName);
        pw.println("\">");
        Base64 base64 = new Base64();
        base64.encodeStream(inputStream, pw);
        pw.println("</binary></document>");
        pw.println("</index>");
      } catch (ManifoldCFException e) {
        throw new IOException(e.getMessage());
      } finally {
        IOUtils.closeQuietly(pw);
      }
    }

    @Override
    public long getContentLength() {
      // Unknown (chunked) length
      return -1L;
    }

    @Override
    public Header getContentType() {
      return new BasicHeader("Content-type","text/xml; charset=utf-8");
    }

    @Override
    public Header getContentEncoding() {
      return null;
    }

  }

  public OpenSearchServerIndex(HttpClient client, String documentURI, InputStream inputStream,
      OpenSearchServerConfig config) throws ManifoldCFException {
    super(client, config);
    StringBuffer url = getApiUrl("update");
    HttpPut put = new HttpPut(url.toString());
    put.setEntity(new IndexRequestEntity(documentURI, inputStream));
    call(put);
    if ("OK".equals(checkXPath(xPathStatus)))
      return;
    String error = checkXPath(xPathException);
    setResult(Result.ERROR, error);
    System.err.println(getResponse());
  }

}


text:
package service

import (
	"github.com/keybase/client/go/badges"
	"github.com/keybase/client/go/libkb"
	"github.com/keybase/client/go/protocol/keybase1"
	"github.com/keybase/go-framed-msgpack-rpc/rpc"
	"golang.org/x/net/context"
)

type badgerHandler struct {
	*BaseHandler
	libkb.Contextified

	badger *badges.Badger
}

func newBadgerHandler(xp rpc.Transporter, g *libkb.GlobalContext, badger *badges.Badger) *badgerHandler {
	return &badgerHandler{
		BaseHandler:  NewBaseHandler(g, xp),
		Contextified: libkb.NewContextified(g),
		badger:       badger,
	}
}

func (a *badgerHandler) GetBadgeState(ctx context.Context) (res keybase1.BadgeState, err error) {
	a.G().Trace("GetBadgeState", &err)()
	return a.badger.State().Export(ctx)
}


text:
var exec = require( 'child_process' )
    .exec;

var handlers = {};

module.exports = handlers;


text:
/* eslint-env meteor */

/* global Queries */

'use strict';

Template.queryHistory.helpers({
  queries: function() {
    return Queries.find();
  }
});

Template.queryHistory.events({
  'click .delete a': function() {
    Queries.remove(this._id);
  }
});


text:
local dir = require("directories")
      dir.addPath("myprograms",
                  "ZeroBraineProjects",
                  "CorporateProjects",
                  -- When not located in general directory search in projects
                  "ZeroBraineProjects/dvdlualib",
                  "ZeroBraineProjects/ExtractWireWiki").addBase("D:/LuaIDE").setBase(1)

local common = require("common")

SERVER = true
CLIENT = true

require("gmodlib")
require("trackasmlib")
asmlib = trackasmlib

CreateConVar("gmod_language")
require("Assembly/autorun/config")

asmlib.SetOpVar("DIRPATH_BAS", dir.getBase(1).."/ZeroBraineProjects/Assembly/")
asmlib.SetLogControl(1000,false)

PIECES = asmlib.GetBuilderNick("PIECES")
require("Assembly/data/pieces")

local mod = "models/sprops/trans/train/track_s01.mdl"
local rec = asmlib.GetCache("TRACKASSEMBLY_PIECES")[mod]
asmlib.LogInstance(asmlib.GetOpVar("DIRPATH_BAS"))
asmlib.GetTransformOA("models/sprops/trans/train/track_s01.mdl", "test")
asmlib.GetTransformOA("models/sprops/trans/train/track_s02.mdl", "test")


text:
var Foo = (function(){"use strict";var PRS$0 = (function(o,t){o["__proto__"]={"a":t};return o["a"]===t})({},{});var DP$0 = Object.defineProperty;var GOPD$0 = Object.getOwnPropertyDescriptor;var MIXIN$0 = function(t,s){for(var p in s){if(s.hasOwnProperty(p)){DP$0(t,p,GOPD$0(s,p));}}return t};var proto$0={};
  function Foo(msg){
    this.msg = msg
  }DP$0(Foo,"prototype",{"configurable":false,"enumerable":false,"writable":false});
  proto$0.show = function() {
    console.log(this.msg);
  };
MIXIN$0(Foo.prototype,proto$0);proto$0=void 0;return Foo;})();


text:
import React from 'react';

class ArticleDes extends React.Component{
  render(){
    return (

{this.props.desc}

      )
  }
}

export default ArticleDes;


text:
namespace Xpressive.Home.Contracts.Variables
{
    public sealed class DoubleVariable : IVariable
    {
        public DoubleVariable() { }

        public DoubleVariable(string name)
        {
            Name = name;
        }

        public string Name { get; set; }

        public double Value { get; set; }

        public string Unit { get; set; }

        object IVariable.Value
        {
            get { return Value; }
            set { Value = (double)value; }
        }
    }
}


text:
from django.contrib.auth.models import User
from django.db import models

class Profile(models.Model):
    user = models.OneToOneField(User)
    name = models.CharField(max_length=200, blank=True)

    def __str__(self):
        return self.name or str(self.user)


text:
import re

from webkitpy.common.memoized import memoized

# In this dictionary, each item stores:
# * port_name -- a fully qualified port name
# * rebaseline_override_dir -- (optional) directory to put baselines in instead of where you would normally put them.
#      This is useful when we don't have bots that cover particular configurations; so, e.g., you might
#      support mac-mountainlion but not have a mac-mountainlion bot yet, so you'd want to put the mac-lion
#      results into platform/mac temporarily.
# * specifiers -- TestExpectation specifiers for that config. Valid values are found in
#      TestExpectationsParser._configuration_tokens_list

_exact_matches = {
    "WebKit XP": {"port_name": "win-xp", "specifiers": ['XP', 'Release']},
    "WebKit Win7": {"port_name": "win-win7", "specifiers": ['Win7', 'Release']},
    "WebKit Win7 (dbg)": {"port_name": "win-win7", "specifiers": ['Win7', 'Debug']},
    "WebKit Linux": {"port_name": "linux-x86_64", "specifiers": ['Linux', 'Release']},
    "WebKit Linux 32": {"port_name": "linux-x86", "specifiers": ['Linux', 'Release']},
    "WebKit Linux (dbg)": {"port_name": "linux-x86_64", "specifiers": ['Linux', 'Debug']},
    "WebKit Mac10.6": {"port_name": "mac-snowleopard", "specifiers": ['SnowLeopard', 'Release']},
    "WebKit Mac10.6 (dbg)": {"port_name": "mac-snowleopard", "specifiers": ['SnowLeopard', 'Debug']},
    "WebKit Mac10.7": {"port_name": "mac-lion", "specifiers": ['Lion', 'Release']},
    "WebKit Mac10.7 (dbg)": {"port_name": "mac-lion", "specifiers": ['Lion', 'Debug']},
    "WebKit Mac10.8": {"port_name": "mac-mountainlion", "specifiers": ['MountainLion', 'Release']},
    "WebKit Mac10.8 (retina)": {"port_name": "mac-retina", "specifiers": ['Retina', 'Release']},
    "WebKit Mac10.9": {"port_name": "mac-mavericks", "specifiers": ['Mavericks', 'Release']},
    "WebKit Android (Nexus4)": {"port_name": "android", "specifiers": ['Android', 'Release']},
}

# Mapping from port name to the deps builder of the same os:
_deps_builders = {
    "linux-x86": "WebKit Linux (deps)",
    "linux-x86_64": "WebKit Linux (deps)",
    "win-xp": "WebKit XP (deps)",
    "win-win7": "WebKit XP (deps)",
    "mac-snowleopard": "WebKit Mac10.6 (deps)",
    # The following port names are mapped to 10.6 bot since we don't have bots
    # for these ports.
    "mac-lion": "WebKit Mac10.6 (deps)",
    "mac-mountainlion": "WebKit Mac10.6 (deps)",
    "mac-mavericks": "WebKit Mac10.6 (deps)",
    "mac-retina": "WebKit Mac10.6 (deps)",
}

_ports_without_builders = [
]

def builder_path_from_name(builder_name):
    return re.sub(r'[\s().]', '_', builder_name)

def all_builder_names():
    return sorted(set(_exact_matches.keys()))

def all_port_names():
    return sorted(set(map(lambda x: x["port_name"], _exact_matches.values()) + _ports_without_builders))

def rebaseline_override_dir(builder_name):
    return _exact_matches[builder_name].get("rebaseline_override_dir", None)

def port_name_for_builder_name(builder_name):
    return _exact_matches[builder_name]["port_name"]

def specifiers_for_builder(builder_name):
    return _exact_matches[builder_name]["specifiers"]

def builder_name_for_port_name(target_port_name):
    debug_builder_name = None
    for builder_name, builder_info in _exact_matches.items():
        if builder_info['port_name'] == target_port_name:
            if 'dbg' in builder_name:
                debug_builder_name = builder_name
            else:
                return builder_name
    return debug_builder_name

def builder_path_for_port_name(port_name):
    builder_path_from_name(builder_name_for_port_name(port_name))

def deps_builder_name_for_port_name(target_port_name):
    return _deps_builders.get(target_port_name, None)


text:
[![NPM version](http://img.shields.io/npm/v/web-component-tester.svg?style=flat-square)](https://npmjs.org/package/web-component-tester)
[![Build Status](http://img.shields.io/travis/Polymer/web-component-tester.svg?style=flat-square)](https://travis-ci.org/Polymer/web-component-tester)
[![Gitter](http://img.shields.io/badge/slack-join%20chat%20%E2%86%92-brightgreen.svg?style=flat-square)](https://polymer-slack.herokuapp.com/)

`web-component-tester` makes testing your web components a breeze!

You get a browser-based testing environment, configured out of the box with:

* [Mocha][mocha] as a test framework.
* [Chai][chai] assertions.
* [Async][async] to keep your sanity.
* [Lodash][lodash] (3.0) to repeat fewer things.
* [Sinon][sinon] and [sinon-chai][sinon-chai] to test just your things.

WCT will [run your tests](#running-your-tests) against whatever browsers you have locally installed, or remotely via Sauce Labs.

# Getting Started

## `.html` Suites

Your test suites can be `.html` documents. For example,
`test/awesomest-tests.html`:

```html
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <script src="../../webcomponentsjs/webcomponents.min.js"></script>
  <script src="../../web-component-tester/browser.js"></script>
  <link rel="import" href="../awesome-element.html">
</head>
<body>
  <awesome-element id="fixture"></awesome-element>
  <script>
    suite('<awesome-element>', function() {
      test('is awesomest', function() {
        assert.isTrue(document.getElementById('fixture').awesomest);
      });
    });
  </script>
</body>
</html>
```

Note that it is _critical_ that you include `web-component-tester/browser.js` in
your test suites. `browser.js` contains all of WCT's client logic (and loads
bundled libraries like mocha and chai).

If you are using [WCT via the command line](#wct), it will automatically serve
its local copy of `browser.js` on any URL that ends with
`/web-component-tester/browser.js`.

## `.js` Suites

Alternatively, you can write tests in separate `.js` sources. For example,
`test/awesome-tests.js`:

```js
suite('AwesomeLib', function() {
  test('is awesome', function() {
    assert.isTrue(AwesomeLib.awesome);
  });
});
```

## Running Your Tests

### `wct`

The easiest way to run your tests is via the `wct` command line tool. Install
it globally via:

```sh
npm install -g web-component-tester
```

Make sure that you also have [Java][java] installed and available on your
`PATH`.

The `wct` tool will run your tests in all the browsers you have installed. Just
run it:

```sh
wct
```

By default, any tests under `test/` will be run. You can override this by
specifying particular files (or globs of files) via `wct path/to/files`.

### Web Server

If you prefer not to use WCT's command line tool, you can also run WCT tests
directly in a browser via a web server of your choosing.

Make sure that WCT's `browser.js` is accessible by your web server, and have
your tests load `browser.js`.

The recommended way to fetch these is via Bower:

    bower install Polymer/web-component-tester --save

#### Nested Suites

To help support this case, you can also directly define an index that will load
any desired tests:

```html
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <script src="../bower_components/webcomponentsjs/webcomponents.min.js"></script>
    <script src="../bower_components/web-component-tester/browser.js"></script>
    <script src="../awesome.js"></script>
  </head>
  <body>
    <script>
      WCT.loadSuites([
        'awesome-tests.js',
        'awesomest-tests.html',
      ]);
    </script>
  </body>
</html>
```

_When you use `wct` on the command line, it is generating an index like this for
you based on the suites you ask it to load._

# Configuration

The `wct` command line tool will pick up custom configuration from a
`wct.conf.json` file located in the root of your project. It should export the
custom configuration:

```js
{
  "verbose": true,
  "plugins": {
    "local": {
      "browsers": ["chrome", "firefox"]
    }
  }
}
```

See [`runner/config.js`](runner/config.js) for the canonical reference of
configuration properties.

You can also specify global defaults (such as `sauce.username`, etc) via a
config file located at `~/wct.conf.json`.

## Plugins

Note that by specifying a plugin's configuration, you are letting WCT know that
it should load that plugin. If you wish to provide default configuration for a
plugin, but not enable it, you can have it default to disabled:

```js
{
  "plugins": {
    "sauce": {
      "disabled": true,
      "browsers": ["chrome", "firefox"]
    }
  }
}
```

Requesting that plugin via `--plugin` on the command line (or overriding the
plugin's configuration to `disabled: false`) will cause the plugin to kick in.

# Nitty Gritty

## Polymer

By default, WCT will defer tests until `WebComponentsReady` has fired. This
saves you from having to wait for elements to upgrade and all that yourself.

If you need to test something that occurs before that event, the [`testImmediate` helper](https://github.com/Polymer/web-component-tester/blob/master/browser/environment/helpers.js#L29-41) can be used. Or, if you just want tests to run as soon as possible, you can disable the delay by setting `WCT.waitForFrameworks = false` (though, they are still async due to Mocha).

## Mocha

WCT supports Mocha's [TDD][mocha-tdd] (`suite`/`test`/etc) and [BDD][mocha-bdd]
(`describe`/`it`/etc) interfaces, and will call `mocha.setup`/`mocha.run` for
you. Just write your tests, and you're set.

## Chai

Similarly, Chai's [`expect`][chai-bdd] and [`assert`][chai-tdd] interfaces are
exposed for your convenience.

## Custom Environments

If you would rather not load WCT's shared environment, or want to have WCT
load additional libraries, you can override the list of scripts loaded. There
are two ways of doing this:

Inside your test code (before `browser.js` is loaded):
```html
<script>
  WCT = {
    environmentScripts: [
      // Mocha and Stacky are required dependencies
      'stacky/lib/parsing.js',
      'stacky/lib/formatting.js',
      'stacky/lib/normalization.js',
      'mocha/mocha.js',
      // Include anything else that you like!
    ],
  };
```

Alternatively, you can specify these options via the `clientOptions`
key in `wct.conf.json`.

A reference of the default configuration can be found at
[browser/config.js](browser/config.js).

## Gulp

We also provide Gulp tasks for your use. `gulpfile.js`:

```js
var gulp = require('gulp');
require('web-component-tester').gulp.init(gulp);
```

Exposes `gulp test:local` and `gulp test:remote`.

## Grunt

Or, Grunt tasks, if you prefer. `gruntfile.js`:

```js
grunt.initConfig({
  'wct-test': {
    local: {
      options: {remote: false},
    },
    remote: {
      options: {remote: true},
    },
    chrome: {
      options: {browsers: ['chrome']},
    },
  },
});

grunt.loadNpmTasks('web-component-tester');
```

Gives you two grunt tasks: `wct-test:local` and `wct-test:remote`. The
`options` you can use are specified in [`runner/config.js`](runner/config.js).

# Plugin Authoring

A plugin is a node module that can hook into various steps of WCT's flow. It
looks like this:

`package.json`:
```js
{
  // ...
  "wct-plugin": {
    "cli-options": {
      // ... option configuration (nomnom)
    }
  }
}
```

`plugin.js` (the plugin's main module)
```js
module.exports = function(context, pluginOptions, plugin) {
  // ...
};
```

The plugin can subscribe to hooks via the [`Context`](runner/context.js)
object. Any options (via wct.conf.json or command line) are merged into
`pluginOptions`. And, `plugin` is the instance of [`Plugin`](runner/plugin.js)
for the plugin.

[wct-local](https://github.com/Polymer/wct-local) and
[wct-sauce](https://github.com/Polymer/wct-sauce) are example plugins you can
follow.

<!-- References -->
[async]:      https://github.com/caolan/async       "Async.js"
[chai-bdd]:   http://chaijs.com/api/bdd/            "Chai's BDD Interface"
[chai-tdd]:   http://chaijs.com/api/assert/         "Chai's TDD Interface"
[chai]:       http://chaijs.com/                    "Chai Assertion Library"
[java]:       https://java.com/download             "Java"
[mocha-bdd]:  http://mochajs.org/#bdd-interface     "Mocha's BDD Interface"
[mocha-tdd]:  http://mochajs.org/#tdd-interface     "Mocha's TDD Interface"
[mocha]:      http://mochajs.org/                   "Mocha Test Framework"
[sauce]:      http://saucelabs.com                  "Sauce Labs"
[opensauce]:  https://saucelabs.com/opensauce       "Open Sauce Testing"
[lodash]:     https://lodash.com/                   "Lo-Dash"
[sinon]:      http://sinonjs.org/                   "Sinon.JS"
[sinon-chai]: https://github.com/domenic/sinon-chai "Chai assertions for Sinon"


text:
#ifndef AUTH_CACHE_H
#define AUTH_CACHE_H

struct auth_cache_node {
	struct auth_cache_node *prev, *next;

	time_t created;
	/* Total number of bytes used by this node */
	uint32_t alloc_size:31;
	/* TRUE if the user gave the correct password the last time. */
	uint32_t last_success:1;

	char data[4]; /* key \0 value \0 */
};

struct auth_cache;
struct auth_request;

/* Parses all %x variables from query and compresses them into tab-separated
   list, so it can be used as a cache key. */
char *auth_cache_parse_key(pool_t pool, const char *query);

/* Create a new cache. max_size specifies the maximum amount of memory in
   bytes to use for cache (it's not fully exact). ttl_secs specifies time to
   live for cache record, requests older than that are not used.
   neg_ttl_secs specifies the TTL for negative entries. */
struct auth_cache *auth_cache_new(size_t max_size, unsigned int ttl_secs,
				  unsigned int neg_ttl_secs);
void auth_cache_free(struct auth_cache **cache);

/* Clear the cache. */
void auth_cache_clear(struct auth_cache *cache);

/* Look key from cache. key should be the same string as returned by
   auth_cache_parse_key(). Returned node can't be used after any other
   auth_cache_*() calls. */
const char *
auth_cache_lookup(struct auth_cache *cache, const struct auth_request *request,
		  const char *key, struct auth_cache_node **node_r,
		  bool *expired_r, bool *neg_expired_r);
/* Insert key => value into cache. "" value means negative cache entry. */
void auth_cache_insert(struct auth_cache *cache, struct auth_request *request,
		       const char *key, const char *value, bool last_success);

/* Remove key from cache */
void auth_cache_remove(struct auth_cache *cache,
		       const struct auth_request *request,
		       const char *key);

#endif


text:
/**
 * @file
 *   This file includes definitions for MAC types.
 */

#ifndef MAC_TYPES_HPP_
#define MAC_TYPES_HPP_

#include "openthread-core-config.h"

#include <stdint.h>
#include <string.h>

#include <openthread/link.h>
#include <openthread/thread.h>

#include "common/as_core_type.hpp"
#include "common/clearable.hpp"
#include "common/data.hpp"
#include "common/equatable.hpp"
#include "common/string.hpp"
#include "crypto/storage.hpp"

namespace ot {
namespace Mac {

/**
 * @addtogroup core-mac
 *
 * @{
 *
 */

/**
 * This type represents the IEEE 802.15.4 PAN ID.
 *
 */
typedef otPanId PanId;

constexpr PanId kPanIdBroadcast = 0xffff; ///< Broadcast PAN ID.

/**
 * This type represents the IEEE 802.15.4 Short Address.
 *
 */
typedef otShortAddress ShortAddress;

constexpr ShortAddress kShortAddrBroadcast = 0xffff; ///< Broadcast Short Address.
constexpr ShortAddress kShortAddrInvalid   = 0xfffe; ///< Invalid Short Address.

/**
 * This function generates a random IEEE 802.15.4 PAN ID.
 *
 * @returns A randomly generated IEEE 802.15.4 PAN ID (excluding `kPanIdBroadcast`).
 *
 */
PanId GenerateRandomPanId(void);

/**
 * This structure represents an IEEE 802.15.4 Extended Address.
 *
 */
OT_TOOL_PACKED_BEGIN
class ExtAddress : public otExtAddress, public Equatable<ExtAddress>, public Clearable<ExtAddress>
{
public:
    static constexpr uint16_t kInfoStringSize = 17; ///< Max chars for the info string (`ToString()`).

    /**
     * This type defines the fixed-length `String` object returned from `ToString()`.
     *
     */
    typedef String<kInfoStringSize> InfoString;

    /**
     * This enumeration type specifies the copy byte order when Extended Address is being copied to/from a buffer.
     *
     */
    enum CopyByteOrder : uint8_t
    {
        kNormalByteOrder,  ///< Copy address bytes in normal order (as provided in array buffer).
        kReverseByteOrder, ///< Copy address bytes in reverse byte order.
    };

    /**
     * This method fills all bytes of address with a given byte value.
     *
     * @param[in] aByte A byte value to fill address with.
     *
     */
    void Fill(uint8_t aByte) { memset(this, aByte, sizeof(*this)); }

    /**
     * This method generates a random IEEE 802.15.4 Extended Address.
     *
     */
    void GenerateRandom(void);

    /**
     * This method sets the Extended Address from a given byte array.
     *
     * @param[in] aBuffer    Pointer to an array containing the Extended Address. `OT_EXT_ADDRESS_SIZE` bytes from
     *                       buffer are copied to form the Extended Address.
     * @param[in] aByteOrder The byte order to use when copying the address.
     *
     */
    void Set(const uint8_t *aBuffer, CopyByteOrder aByteOrder = kNormalByteOrder)
    {
        CopyAddress(m8, aBuffer, aByteOrder);
    }

    /**
     * This method indicates whether or not the Group bit is set.
     *
     * @retval TRUE   If the group bit is set.
     * @retval FALSE  If the group bit is not set.
     *
     */
    bool IsGroup(void) const { return (m8[0] & kGroupFlag) != 0; }

    /**
     * This method sets the Group bit.
     *
     * @param[in]  aGroup  TRUE if group address, FALSE otherwise.
     *
     */
    void SetGroup(bool aGroup)
    {
        if (aGroup)
        {
            m8[0] |= kGroupFlag;
        }
        else
        {
            m8[0] &= ~kGroupFlag;
        }
    }

    /**
     * This method toggles the Group bit.
     *
     */
    void ToggleGroup(void) { m8[0] ^= kGroupFlag; }

    /**
     * This method indicates whether or not the Local bit is set.
     *
     * @retval TRUE   If the local bit is set.
     * @retval FALSE  If the local bit is not set.
     *
     */
    bool IsLocal(void) const { return (m8[0] & kLocalFlag) != 0; }

    /**
     * This method sets the Local bit.
     *
     * @param[in]  aLocal  TRUE if locally administered, FALSE otherwise.
     *
     */
    void SetLocal(bool aLocal)
    {
        if (aLocal)
        {
            m8[0] |= kLocalFlag;
        }
        else
        {
            m8[0] &= ~kLocalFlag;
        }
    }

    /**
     * This method toggles the Local bit.
     *
     */
    void ToggleLocal(void) { m8[0] ^= kLocalFlag; }

    /**
     * This method copies the Extended Address into a given buffer.
     *
     * @param[out] aBuffer     A pointer to a buffer to copy the Extended Address into.
     * @param[in]  aByteOrder  The byte order to copy the address.
     *
     */
    void CopyTo(uint8_t *aBuffer, CopyByteOrder aByteOrder = kNormalByteOrder) const
    {
        CopyAddress(aBuffer, m8, aByteOrder);
    }

    /**
     * This method converts an address to a string.
     *
     * @returns An `InfoString` containing the string representation of the Extended Address.
     *
     */
    InfoString ToString(void) const;

private:
    static constexpr uint8_t kGroupFlag = (1 << 0);
    static constexpr uint8_t kLocalFlag = (1 << 1);

    static void CopyAddress(uint8_t *aDst, const uint8_t *aSrc, CopyByteOrder aByteOrder);
} OT_TOOL_PACKED_END;

/**
 * This class represents an IEEE 802.15.4 Short or Extended Address.
 *
 */
class Address
{
public:
    /**
     * This type defines the fixed-length `String` object returned from `ToString()`.
     *
     */
    typedef ExtAddress::InfoString InfoString;

    /**
     * This enumeration specifies the IEEE 802.15.4 Address type.
     *
     */
    enum Type : uint8_t
    {
        kTypeNone,     ///< No address.
        kTypeShort,    ///< IEEE 802.15.4 Short Address.
        kTypeExtended, ///< IEEE 802.15.4 Extended Address.
    };

    /**
     * This constructor initializes an Address.
     *
     */
    Address(void)
        : mType(kTypeNone)
    {
    }

    /**
     * This method gets the address type (Short Address, Extended Address, or none).
     *
     * @returns The address type.
     *
     */
    Type GetType(void) const { return mType; }

    /**
     * This method indicates whether or not there is an address.
     *
     * @returns TRUE if there is no address (i.e. address type is `kTypeNone`), FALSE otherwise.
     *
     */
    bool IsNone(void) const { return (mType == kTypeNone); }

    /**
     * This method indicates whether or not the Address is a Short Address.
     *
     * @returns TRUE if it is a Short Address, FALSE otherwise.
     *
     */
    bool IsShort(void) const { return (mType == kTypeShort); }

    /**
     * This method indicates whether or not the Address is an Extended Address.
     *
     * @returns TRUE if it is an Extended Address, FALSE otherwise.
     *
     */
    bool IsExtended(void) const { return (mType == kTypeExtended); }

    /**
     * This method gets the address as a Short Address.
     *
     * This method MUST be used only if the address type is Short Address.
     *
     * @returns The Short Address.
     *
     */
    ShortAddress GetShort(void) const { return mShared.mShortAddress; }

    /**
     * This method gets the address as an Extended Address.
     *
     * This method MUST be used only if the address type is Extended Address.
     *
     * @returns A constant reference to the Extended Address.
     *
     */
    const ExtAddress &GetExtended(void) const { return mShared.mExtAddress; }

    /**
     * This method gets the address as an Extended Address.
     *
     * This method MUST be used only if the address type is Extended Address.
     *
     * @returns A reference to the Extended Address.
     *
     */
    ExtAddress &GetExtended(void) { return mShared.mExtAddress; }

    /**
     * This method sets the address to none (i.e., clears the address).
     *
     * Address type will be updated to `kTypeNone`.
     *
     */
    void SetNone(void) { mType = kTypeNone; }

    /**
     * This method sets the address with a Short Address.
     *
     * The type is also updated to indicate that address is Short.
     *
     * @param[in]  aShortAddress  A Short Address
     *
     */
    void SetShort(ShortAddress aShortAddress)
    {
        mShared.mShortAddress = aShortAddress;
        mType                 = kTypeShort;
    }

    /**
     * This method sets the address with an Extended Address.
     *
     * The type is also updated to indicate that the address is Extended.
     *
     * @param[in]  aExtAddress  An Extended Address
     *
     */
    void SetExtended(const ExtAddress &aExtAddress)
    {
        mShared.mExtAddress = aExtAddress;
        mType               = kTypeExtended;
    }

    /**
     * This method sets the address with an Extended Address given as a byte array.
     *
     * The type is also updated to indicate that the address is Extended.
     *
     * @param[in] aBuffer    Pointer to an array containing the Extended Address. `OT_EXT_ADDRESS_SIZE` bytes from
     *                       buffer are copied to form the Extended Address.
     * @param[in] aByteOrder The byte order to copy the address from @p aBuffer.
     *
     */
    void SetExtended(const uint8_t *aBuffer, ExtAddress::CopyByteOrder aByteOrder = ExtAddress::kNormalByteOrder)
    {
        mShared.mExtAddress.Set(aBuffer, aByteOrder);
        mType = kTypeExtended;
    }

    /**
     * This method indicates whether or not the address is a Short Broadcast Address.
     *
     * @returns TRUE if address is Short Broadcast Address, FALSE otherwise.
     *
     */
    bool IsBroadcast(void) const { return ((mType == kTypeShort) && (GetShort() == kShortAddrBroadcast)); }

    /**
     * This method indicates whether or not the address is a Short Invalid Address.
     *
     * @returns TRUE if address is Short Invalid Address, FALSE otherwise.
     *
     */
    bool IsShortAddrInvalid(void) const { return ((mType == kTypeShort) && (GetShort() == kShortAddrInvalid)); }

    /**
     * This method converts an address to a null-terminated string
     *
     * @returns A `String` representing the address.
     *
     */
    InfoString ToString(void) const;

private:
    union
    {
        ShortAddress mShortAddress; ///< The IEEE 802.15.4 Short Address.
        ExtAddress   mExtAddress;   ///< The IEEE 802.15.4 Extended Address.
    } mShared;

    Type mType; ///< The address type (Short, Extended, or none).
};

/**
 * This structure represents two MAC addresses corresponding to source and destination.
 *
 */
struct Addresses
{
    Address mSource;      ///< Source address.
    Address mDestination; ///< Destination address.
};

/**
 * This class represents a MAC key.
 *
 */
OT_TOOL_PACKED_BEGIN
class Key : public otMacKey, public Equatable<Key>, public Clearable<Key>
{
public:
    static constexpr uint16_t kSize = OT_MAC_KEY_SIZE; ///< Key size in bytes.

    /**
     * This method gets a pointer to the bytes array containing the key
     *
     * @returns A pointer to the byte array containing the key.
     *
     */
    const uint8_t *GetBytes(void) const { return m8; }

} OT_TOOL_PACKED_END;

/**
 * This type represents a MAC Key Ref used by PSA.
 *
 */
typedef otMacKeyRef KeyRef;

/**
 * This class represents a MAC Key Material.
 *
 */
class KeyMaterial : public otMacKeyMaterial, public Unequatable<KeyMaterial>
{
public:
    /**
     * This constructor initializes a `KeyMaterial`.
     *
     */
    KeyMaterial(void)
    {
        GetKey().Clear();
#if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
        SetKeyRef(kInvalidKeyRef);
#endif
    }

#if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
    /**
     * This method overload `=` operator to assign the `KeyMaterial` from another one.
     *
     * If the `KeyMaterial` currently stores a valid and different `KeyRef`, the assignment of new value will ensure to
     * delete the previous one before using the new `KeyRef` from @p aOther.
     *
     * @param[in] aOther  aOther  The other `KeyMaterial` instance to assign from.
     *
     * @returns A reference to the current `KeyMaterial`
     *
     */
    KeyMaterial &operator=(const KeyMaterial &aOther);

    KeyMaterial(const KeyMaterial &) = delete;
#endif

    /**
     *  This method clears the `KeyMaterial`.
     *
     * Under `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE`, if the `KeyMaterial` currently stores a valid previous
     * `KeyRef`, the `Clear()` call will ensure to delete the previous `KeyRef` and set it to `kInvalidKeyRef`.
     *
     */
    void Clear(void);

#if !OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
    /**
     * This method gets the literal `Key`.
     *
     * @returns The literal `Key`
     *
     */
    const Key &GetKey(void) const { return static_cast<const Key &>(mKeyMaterial.mKey); }

#else
    /**
     * This method gets the stored `KeyRef`
     *
     * @returns The `KeyRef`
     *
     */
    KeyRef GetKeyRef(void) const { return mKeyMaterial.mKeyRef; }
#endif

    /**
     * This method sets the `KeyMaterial` from a given Key.
     *
     * If the `KeyMaterial` currently stores a valid `KeyRef`, the `SetFrom()` call will ensure to delete the previous
     * one before creating and using a new `KeyRef` associated with the new `Key`.
     *
     * @param[in] aKey           A reference to the new key.
     * @param[in] aIsExportable  Boolean indicating if the key is exportable (this is only applicable under
     *                           `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` config).
     *
     */
    void SetFrom(const Key &aKey, bool aIsExportable = false);

    /**
     * This method extracts the literal key from `KeyMaterial`
     *
     * @param[out] aKey  A reference to the output the key.
     *
     */
    void ExtractKey(Key &aKey);

    /**
     * This method converts `KeyMaterial` to a `Crypto::Key`.
     *
     * @param[out]  aCryptoKey  A reference to a `Crypto::Key` to populate.
     *
     */
    void ConvertToCryptoKey(Crypto::Key &aCryptoKey) const;

    /**
     * This method overloads operator `==` to evaluate whether or not two `KeyMaterial` instances are equal.
     *
     * @param[in]  aOther  The other `KeyMaterial` instance to compare with.
     *
     * @retval TRUE   If the two `KeyMaterial` instances are equal.
     * @retval FALSE  If the two `KeyMaterial` instances are not equal.
     *
     */
    bool operator==(const KeyMaterial &aOther) const;

private:
#if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
    static constexpr KeyRef kInvalidKeyRef = Crypto::Storage::kInvalidKeyRef;

    void DestroyKey(void);
    void SetKeyRef(KeyRef aKeyRef) { mKeyMaterial.mKeyRef = aKeyRef; }
#endif
    Key &GetKey(void) { return static_cast<Key &>(mKeyMaterial.mKey); }
    void SetKey(const Key &aKey) { mKeyMaterial.mKey = aKey; }
};

#if OPENTHREAD_CONFIG_MULTI_RADIO

/**
 * This enumeration defines the radio link types.
 *
 */
enum RadioType : uint8_t
{
#if OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE
    kRadioTypeIeee802154, ///< IEEE 802.15.4 (2.4GHz) link type.
#endif
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
    kRadioTypeTrel, ///< Thread Radio Encapsulation link type.
#endif
};

/**
 * This constant specifies the number of supported radio link types.
 *
 */
constexpr uint8_t kNumRadioTypes = (((OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE) ? 1 : 0) +
                                    ((OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE) ? 1 : 0));

/**
 * This class represents a set of radio links.
 *
 */
class RadioTypes
{
public:
    static constexpr uint16_t kInfoStringSize = 32; ///< Max chars for the info string (`ToString()`).

    /**
     * This type defines the fixed-length `String` object returned from `ToString()`.
     *
     */
    typedef String<kInfoStringSize> InfoString;

    /**
     * This static class variable defines an array containing all supported radio link types.
     *
     */
    static const RadioType kAllRadioTypes[kNumRadioTypes];

    /**
     * This constructor initializes a `RadioTypes` object as empty set
     *
     */
    RadioTypes(void)
        : mBitMask(0)
    {
    }

    /**
     * This constructor initializes a `RadioTypes` object with a given bit-mask.
     *
     * @param[in] aMask   A bit-mask representing the radio types (the first bit corresponds to radio type 0, and so on)
     *
     */
    explicit RadioTypes(uint8_t aMask)
        : mBitMask(aMask)
    {
    }

    /**
     * This method clears the set.
     *
     */
    void Clear(void) { mBitMask = 0; }

    /**
     * This method indicates whether the set is empty or not
     *
     * @returns TRUE if the set is empty, FALSE otherwise.
     *
     */
    bool IsEmpty(void) const { return (mBitMask == 0); }

    /**
     *  This method indicates whether the set contains only a single radio type.
     *
     * @returns TRUE if the set contains a single radio type, FALSE otherwise.
     *
     */
    bool ContainsSingleRadio(void) const { return !IsEmpty() && ((mBitMask & (mBitMask - 1)) == 0); }

    /**
     * This method indicates whether or not the set contains a given radio type.
     *
     * @param[in] aType  A radio link type.
     *
     * @returns TRUE if the set contains @p aType, FALSE otherwise.
     *
     */
    bool Contains(RadioType aType) const { return ((mBitMask & BitFlag(aType)) != 0); }

    /**
     * This method adds a radio type to the set.
     *
     * @param[in] aType  A radio link type.
     *
     */
    void Add(RadioType aType) { mBitMask |= BitFlag(aType); }

    /**
     * This method adds another radio types set to the current one.
     *
     * @param[in] aTypes   A radio link type set to add.
     *
     */
    void Add(RadioTypes aTypes) { mBitMask |= aTypes.mBitMask; }

    /**
     * This method adds all radio types supported by device to the set.
     *
     */
    void AddAll(void);

    /**
     * This method removes a given radio type from the set.
     *
     * @param[in] aType  A radio link type.
     *
     */
    void Remove(RadioType aType) { mBitMask &= ~BitFlag(aType); }

    /**
     * This method gets the radio type set as a bitmask.
     *
     * The first bit in the mask corresponds to first radio type (radio type with value zero), and so on.
     *
     * @returns A bitmask representing the set of radio types.
     *
     */
    uint8_t GetAsBitMask(void) const { return mBitMask; }

    /**
     * This method overloads operator `-` to return a new set which is the set difference between current set and
     * a given set.
     *
     * @param[in] aOther  Another radio type set.
     *
     * @returns A new set which is set difference between current one and @p aOther.
     *
     */
    RadioTypes operator-(const RadioTypes &aOther) const { return RadioTypes(mBitMask & ~aOther.mBitMask); }

    /**
     * This method converts the radio set to human-readable string.
     *
     * @return A string representation of the set of radio types.
     *
     */
    InfoString ToString(void) const;

private:
    static uint8_t BitFlag(RadioType aType) { return static_cast<uint8_t>(1U << static_cast<uint8_t>(aType)); }

    uint8_t mBitMask;
};

/**
 * This function converts a link type to a string
 *
 * @param[in] aRadioType  A link type value.
 *
 * @returns A string representation of the link type.
 *
 */
const char *RadioTypeToString(RadioType aRadioType);

#endif // OPENTHREAD_CONFIG_MULTI_RADIO

/**
 * This class represents Link Frame Counters for all supported radio links.
 *
 */
class LinkFrameCounters
{
public:
    /**
     * This method resets all counters (set them all to zero).
     *
     */
    void Reset(void) { SetAll(0); }

#if OPENTHREAD_CONFIG_MULTI_RADIO

    /**
     * This method gets the link Frame Counter for a given radio link.
     *
     * @param[in] aRadioType  A radio link type.
     *
     * @returns The Link Frame Counter for radio link @p aRadioType.
     *
     */
    uint32_t Get(RadioType aRadioType) const;

    /**
     * This method sets the Link Frame Counter for a given radio link.
     *
     * @param[in] aRadioType  A radio link type.
     * @param[in] aCounter    The new counter value.
     *
     */
    void Set(RadioType aRadioType, uint32_t aCounter);

#else

    /**
     * This method gets the Link Frame Counter value.
     *
     * @return The Link Frame Counter value.
     *
     */
    uint32_t Get(void) const
#if OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE
    {
        return m154Counter;
    }
#elif OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
    {
        return mTrelCounter;
    }
#endif

    /**
     * This method sets the Link Frame Counter for a given radio link.
     *
     * @param[in] aCounter    The new counter value.
     *
     */
    void Set(uint32_t aCounter)
#if OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE
    {
        m154Counter = aCounter;
    }
#elif OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
    {
        mTrelCounter = aCounter;
    }
#endif

#endif // OPENTHREAD_CONFIG_MULTI_RADIO

#if OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE
    /**
     * This method gets the Link Frame Counter for 802.15.4 radio link.
     *
     * @returns The Link Frame Counter for 802.15.4 radio link.
     *
     */
    uint32_t Get154(void) const { return m154Counter; }

    /**
     * This method sets the Link Frame Counter for 802.15.4 radio link.
     *
     * @param[in] aCounter   The new counter value.
     *
     */
    void Set154(uint32_t aCounter) { m154Counter = aCounter; }
#endif

#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
    /**
     * This method gets the Link Frame Counter for TREL radio link.
     *
     * @returns The Link Frame Counter for TREL radio link.
     *
     */
    uint32_t GetTrel(void) const { return mTrelCounter; }

    /**
     * This method increments the Link Frame Counter for TREL radio link.
     *
     */
    void IncrementTrel(void) { mTrelCounter++; }
#endif

    /**
     * This method gets the maximum Link Frame Counter among all supported radio links.
     *
     * @return The maximum Link frame Counter among all supported radio links.
     *
     */
    uint32_t GetMaximum(void) const;

    /**
     * This method sets the Link Frame Counter value for all radio links.
     *
     * @param[in]  aCounter  The Link Frame Counter value.
     *
     */
    void SetAll(uint32_t aCounter);

private:
#if OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE
    uint32_t m154Counter;
#endif
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
    uint32_t mTrelCounter;
#endif
};

/**
 * This class represents CSL accuracy.
 *
 */
class CslAccuracy
{
public:
    static constexpr uint8_t kWorstClockAccuracy = 255; ///< Worst possible crystal accuracy, in units of ± ppm.
    static constexpr uint8_t kWorstUncertainty   = 255; ///< Worst possible uncertainty, in units of 10 microseconds.

    /**
     * This method initializes the CSL accuracy using `kWorstClockAccuracy` and `kWorstUncertainty` values.
     *
     */
    void Init(void)
    {
        mClockAccuracy = kWorstClockAccuracy;
        mUncertainty   = kWorstUncertainty;
    }

    /**
     * This method returns the CSL clock accuracy.
     *
     * @returns The CSL clock accuracy in ± ppm.
     *
     */
    uint8_t GetClockAccuracy(void) const { return mClockAccuracy; }

    /**
     * This method sets the CSL clock accuracy.
     *
     * @param[in]  aClockAccuracy  The CSL clock accuracy in ± ppm.
     *
     */
    void SetClockAccuracy(uint8_t aClockAccuracy) { mClockAccuracy = aClockAccuracy; }

    /**
     * This method returns the CSL uncertainty.
     *
     * @returns The uncertainty in units 10 microseconds.
     *
     */
    uint8_t GetUncertainty(void) const { return mUncertainty; }

    /**
     * This method gets the CLS uncertainty in microseconds.
     *
     * @returns the CLS uncertainty in microseconds.
     *
     */
    uint16_t GetUncertaintyInMicrosec(void) const { return static_cast<uint16_t>(mUncertainty) * kUsPerUncertUnit; }

    /**
     * This method sets the CSL uncertainty.
     *
     * @param[in]  aUncertainty  The CSL uncertainty in units 10 microseconds.
     *
     */
    void SetUncertainty(uint8_t aUncertainty) { mUncertainty = aUncertainty; }

private:
    static constexpr uint8_t kUsPerUncertUnit = 10;

    uint8_t mClockAccuracy;
    uint8_t mUncertainty;
};

/**
 * @}
 *
 */

} // namespace Mac

DefineCoreType(otExtAddress, Mac::ExtAddress);
DefineCoreType(otMacKey, Mac::Key);

} // namespace ot

#endif // MAC_TYPES_HPP_


text:
<?xml version="1.0" encoding="UTF-8" ?>
<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.65.57"
          id="OpportunityVO" Package="com.oracle.ptsdemo.uiaccelerator.vo"
          BeanClass="com.oracle.ptsdemo.uiaccelerator.vo.OpportunityVO"
          isJavaBased="true">
  <Attribute Name="optyId" Type="java.lang.Long"/>
  <Attribute Name="optyName" Type="java.lang.String"/>
  <Attribute Name="partyUniqueName" Type="java.lang.String"/>
  <Attribute Name="revenueValue" Type="java.math.BigDecimal"/>
  <Attribute Name="optyCreationDate" Type="java.util.Calendar"/>
  <Attribute Name="optyLastUpdateDate" Type="java.util.Calendar"/>
  <ConstructorMethod IsCollection="true"
                     Type="com.oracle.ptsdemo.uiaccelerator.vo.OpportunityVO"
                     BeanClass="com.oracle.ptsdemo.uiaccelerator.vo.OpportunityVO"
                     id="OpportunityVO"/>
</JavaBean>


text:
/********************************************************************************
** Form generated from reading ui file 'frmConsRecep.jui'
**
** Created: vie dic 2 09:31:04 2011
**      by: Qt User Interface Compiler version 4.5.2
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
********************************************************************************/

package com.eims.ris.gui;

import com.trolltech.qt.core.*;
import com.trolltech.qt.gui.*;

public class Ui_frmConsRecep implements com.trolltech.qt.QUiForm<QDialog>
{
    public QLabel label;
    public QLabel label_2;
    public QTableWidget twRecepciones;
    public QLabel label_3;
    public QDateEdit deFDesde;
    public QDateEdit deFHasta;
    public QPushButton btnAceptar;
    public QPushButton btnImprimir;

    public Ui_frmConsRecep() { super(); }

    public void setupUi(QDialog frmConsRecep)
    {
        frmConsRecep.setObjectName("frmConsRecep");
        frmConsRecep.resize(new QSize(800, 600).expandedTo(frmConsRecep.minimumSizeHint()));
        frmConsRecep.setWindowIcon(new QIcon(new QPixmap("classpath:com/eims/ris/images/recep64.png")));
        label = new QLabel(frmConsRecep);
        label.setObjectName("label");
        label.setGeometry(new QRect(0, 0, 801, 91));
        label.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 50, 100, 255), stop:1 rgba(0, 0, 0, 0));");
        label.setPixmap(new QPixmap(("classpath:com/eims/ris/images/recep64.png")));
        label.setMargin(10);
        label_2 = new QLabel(frmConsRecep);
        label_2.setObjectName("label_2");
        label_2.setGeometry(new QRect(90, 10, 601, 64));
        twRecepciones = new QTableWidget(frmConsRecep);
        twRecepciones.setObjectName("twRecepciones");
        twRecepciones.setGeometry(new QRect(10, 110, 781, 481));
        twRecepciones.setStyleSheet("QTableWidget {\n"+
"    show-decoration-selected: 1;\n"+
"	alternate-background-color: rgb(247, 255, 193);\n"+
"	background-color: rgba(240, 240, 240, 100);\n"+
"}\n"+
"\n"+
"QTableWidget::item:hover {\n"+
"     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);\n"+
"}\n"+
"\n"+
"QTableWidget::item:selected:active{\n"+
"     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgba(128, 163, 186, 150), stop: 1 rgba(87, 127, 191, 150));\n"+
"}\n"+
"\n"+
"QTableWidget::item:selected:!active {\n"+
"     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgba(128, 163, 186, 150), stop: 1 rgba(87, 127, 191, 150));\n"+
"}");
        twRecepciones.setEditTriggers(com.trolltech.qt.gui.QAbstractItemView.EditTrigger.createQFlags(com.trolltech.qt.gui.QAbstractItemView.EditTrigger.NoEditTriggers));
        twRecepciones.setAlternatingRowColors(true);
        twRecepciones.setSelectionMode(com.trolltech.qt.gui.QAbstractItemView.SelectionMode.SingleSelection);
        twRecepciones.setSelectionBehavior(com.trolltech.qt.gui.QAbstractItemView.SelectionBehavior.SelectRows);
        label_3 = new QLabel(frmConsRecep);
        label_3.setObjectName("label_3");
        label_3.setGeometry(new QRect(320, 80, 56, 21));
        QFont font = new QFont();
        font.setBold(true);
        font.setWeight(75);
        label_3.setFont(font);
        deFDesde = new QDateEdit(frmConsRecep);
        deFDesde.setObjectName("deFDesde");
        deFDesde.setGeometry(new QRect(380, 76, 101, 25));
        deFDesde.setAutoFillBackground(true);
        deFDesde.setCalendarPopup(true);
        deFDesde.setDate(new QDate(2011, 12, 1));
        deFHasta = new QDateEdit(frmConsRecep);
        deFHasta.setObjectName("deFHasta");
        deFHasta.setGeometry(new QRect(490, 76, 101, 25));
        deFHasta.setAutoFillBackground(true);
        deFHasta.setCalendarPopup(true);
        deFHasta.setDate(new QDate(2011, 12, 1));
        btnAceptar = new QPushButton(frmConsRecep);
        btnAceptar.setObjectName("btnAceptar");
        btnAceptar.setGeometry(new QRect(600, 72, 91, 31));
        btnAceptar.setCursor(new QCursor(Qt.CursorShape.PointingHandCursor));
        btnAceptar.setIcon(new QIcon(new QPixmap("classpath:com/eims/ris/images/ok48.png")));
        btnAceptar.setIconSize(new QSize(24, 24));
        btnImprimir = new QPushButton(frmConsRecep);
        btnImprimir.setObjectName("btnImprimir");
        btnImprimir.setGeometry(new QRect(700, 72, 91, 31));
        btnImprimir.setCursor(new QCursor(Qt.CursorShape.PointingHandCursor));
        btnImprimir.setIcon(new QIcon(new QPixmap("classpath:com/eims/ris/images/print48.png")));
        btnImprimir.setIconSize(new QSize(24, 24));
        retranslateUi(frmConsRecep);

        frmConsRecep.connectSlotsByName();
    } // setupUi

    void retranslateUi(QDialog frmConsRecep)
    {
        frmConsRecep.setWindowTitle(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Consulta de recepciones", null));
        label.setText("");
        label_2.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"+
"<meta name=\"qrichtext\" content=\"1\" />\n"+
"
CONSULTA DE RECEPCIONES
\n"+
"
Aqu\u00ed podr\u00e1 consultar y/o imprimir recepciones realizadas durante un periodo determinado.
\n"+
"
Ingrese los par\u00e1metros y haga clic en aceptar.
", null));
        twRecepciones.clear();
        twRecepciones.setColumnCount(9);

        QTableWidgetItem __colItem = new QTableWidgetItem();
        __colItem.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "ID", null));
        twRecepciones.setHorizontalHeaderItem(0, __colItem);

        QTableWidgetItem __colItem1 = new QTableWidgetItem();
        __colItem1.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Tipo", null));
        twRecepciones.setHorizontalHeaderItem(1, __colItem1);

        QTableWidgetItem __colItem2 = new QTableWidgetItem();
        __colItem2.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Fecha/Hora", null));
        twRecepciones.setHorizontalHeaderItem(2, __colItem2);

        QTableWidgetItem __colItem3 = new QTableWidgetItem();
        __colItem3.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Paciente", null));
        twRecepciones.setHorizontalHeaderItem(3, __colItem3);

        QTableWidgetItem __colItem4 = new QTableWidgetItem();
        __colItem4.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Derivador", null));
        twRecepciones.setHorizontalHeaderItem(4, __colItem4);

        QTableWidgetItem __colItem5 = new QTableWidgetItem();
        __colItem5.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "N.U.", null));
        twRecepciones.setHorizontalHeaderItem(5, __colItem5);

        QTableWidgetItem __colItem6 = new QTableWidgetItem();
        __colItem6.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Asiste", null));
        twRecepciones.setHorizontalHeaderItem(6, __colItem6);

        QTableWidgetItem __colItem7 = new QTableWidgetItem();
        __colItem7.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Estado", null));
        twRecepciones.setHorizontalHeaderItem(7, __colItem7);

        QTableWidgetItem __colItem8 = new QTableWidgetItem();
        __colItem8.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Sistema Salud", null));
        twRecepciones.setHorizontalHeaderItem(8, __colItem8);
        twRecepciones.setRowCount(0);
        label_3.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Periodo", null));
        btnAceptar.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Aceptar", null));
        btnImprimir.setText(com.trolltech.qt.core.QCoreApplication.translate("frmConsRecep", "Imprimir", null));
    } // retranslateUi

}


text:
{{#unless tests}}

    {{#heading 3}}no tests info available...{{/heading}}

{{/unless}}
{{#if tests}}

    {{#heading 2}}Tests{{/heading}}

        {{tests}}

{{/if}}


text:
layout: post
status: publish
published: true
title: Upgraded to Ubuntu 9.04
author:
  display_name: Tomas Restrepo
  login: tomasr
  email: tomas@winterdom.com
  url: http://winterdom.com/
author_login: tomasr
author_email: tomas@winterdom.com
author_url: http://winterdom.com/
wordpress_id: 40
wordpress_url: http://winterdom.com/2009/04/upgradedtoubuntu904
date: '2009-04-23 23:16:14 +0000'
date_gmt: '2009-04-23 23:16:14 +0000'
categories:
- Linux
tags: []
comments:
- id: 768
  author: Pedro
  author_email: pedro_rui@hotmail.com
  author_url: ''
  date: '2009-05-13 20:27:11 +0000'
  date_gmt: '2009-05-13 20:27:11 +0000'
  content: Nice desktop. What's the theme you're using?
- id: 769
  author: Tomas Restrepo
  author_email: tomas@winterdom.com
  author_url: http://winterdom.com/
  date: '2009-05-14 00:44:03 +0000'
  date_gmt: '2009-05-14 00:44:03 +0000'
  content: 'Pedro: I believe it''s New Wave Dark Menus with a few customized things
    (like the icons). The wallpaper is just something I created with http://www.bgpatterns.com/
    if I remember correctly.'
---

Today was the release of Ubuntu 9.04 Jaunty Jackalope, so I immediately started an in-place upgrade of my Dell D820 laptop. Downloading the packages took forever (the servers where obviously getting hammered pretty badly), but finally completed at the end of the afternoon.

After that, actually installing the downloaded packages took about an hour and a half, part of it because I always forget how many prompts an Ubuntu update puts up throughout the process.

 After installation and rebooting, I came up to pretty much the same desktop I had before (good). However, I soon ran into troubles: X and Gnome completely locking hard on me. No applications would respond at all (not even a terminal window already opened) so I was forced to drop back to another terminal window and reboot the machine from there.

After this happening three or four times in a row, I realized the lockup would only happen when I tried to change the theme from the Gnome settings panel. As long as I didn’t do that, everything seemed to work just fine.

That’s when it occurred to me to just drop down and remove my ~/.themes directory. As soon as I did that, I was able to change my gnome appearance settings without X locking up on me.

Not sure what I had in there to cause such troubles, but there you go. I’ll report later then on any new things I find.


text:
*****************
  Shared Object
*****************

.. topic:: Introduction

   The Adobe Flash Player has the ability to store persistent data on
   your computer, similar to a cookie, called a `Local Shared Object`_.
   PyAMF has the ability to read and write these ``.sol`` files.

.. contents::

Find the files
==============

The Local Shared Object files are not stored in the cookies folder of
your browser and the location also differs depending on the operating
system you are using.

For the Windows user::

   C:\Documents and Settings\{Your User Name}\Application Data\Macromedia\Flash Player\#SharedObjects\

On Linux::

   /home/{Your User Name}/.macromedia/Flash_Player/#SharedObjects/

On Mac OS X::

   /Users/{Your User Name}/Library/Preferences/Macromedia/Flash Player/#SharedObjects/

Manipulating the files
======================

PyAMF makes it as easy as possible to interact with these files.

Loading a Local Shared Object
-----------------------------

This file is located in the ``youtube.com`` directory, check it out on your
own system (assuming you've visited youtube.com_ at some point).

.. code-block:: python
   :linenos:

   from pyamf import sol

   file = 'timeDisplayConfig.sol'
   lso = sol.load(file)
   print lso

Which should output the following:

.. code-block:: python

   {u'modeDefaultSet': True, u'displayMode': u'played'}

Saving a Local Shared Object
----------------------------

.. code-block:: python
   :linenos:

   from pyamf import sol

   lso = sol.SOL('userData')
   lso['username'] = 'joe.bloggs'

   file = 'loginDetails.sol'
   sol.save(lso, file)

AMF0 and AMF3
=============

Since the introduction of the Adobe Flash Player 9, sol's can be read/written
using AMF0 encoding or AMF3 encoding. PyAMF also supports this. When reading
a sol file, PyAMF will automatically detect which encoding is used and act
appropriately.

When writing a sol, the default is to use AMF0. You can override this by
supplying the ``encoding`` keyword to the ``save`` function.

.. code-block:: python
    :linenos:

    from pyamf import sol, AMF3

    lso = sol.SOL('scoreData')
    lso['highScores'] = {
       'nick': 3400,
       'thijs': 3800,
       'arnar': 4500
    }

    file = 'highScores.sol'
    sol.save(lso, file, encoding=AMF3)

.. _youtube.com: http://www.youtube.com
.. _Local Shared Object: http://en.wikipedia.org/wiki/Local_Shared_Object


text:
.class Lcom/android/server/backup/BackupManagerService$ClearRetryParams;
.super Ljava/lang/Object;
.source "BackupManagerService.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/server/backup/BackupManagerService;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "ClearRetryParams"
.end annotation

# instance fields
.field public packageName:Ljava/lang/String;

.field final synthetic this$0:Lcom/android/server/backup/BackupManagerService;

.field public transportName:Ljava/lang/String;

# direct methods
.method constructor <init>(Lcom/android/server/backup/BackupManagerService;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/android/server/backup/BackupManagerService$ClearRetryParams;->this$0:Lcom/android/server/backup/BackupManagerService;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p2, p0, Lcom/android/server/backup/BackupManagerService$ClearRetryParams;->transportName:Ljava/lang/String;

    iput-object p3, p0, Lcom/android/server/backup/BackupManagerService$ClearRetryParams;->packageName:Ljava/lang/String;

    return-void
.end method


text:
package com.hiwhitley.easy.day14;

import com.hiwhitley.base.TreeNode;

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

/**
 * Created by hiwhitley on 2016/8/18.
 */
public class LevelOrder {
    public List<List<Integer>> levelOrder(TreeNode root) {
        List<List<Integer>> result = new ArrayList<>();
        helper(root, 0, result);
        return result;
    }

    public void helper(TreeNode root, int depth, List<List<Integer>> result) {
        if(root == null) return;
        if(result.size() <= depth) result.add(new ArrayList<>());
        result.get(depth).add(root.val);
        helper(root.left, depth+1, result);
        helper(root.right, depth+1, result);
    }
}


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Parmelia nigherrensis C.W. Dodge

### Remarks
null


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/scringo_bg"
    android:orientation="vertical"
    android:padding="0dp" >

    <com.scringo.features.ScringoTitleBar
        android:id="@+id/scringoTitleBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1" >

        <RelativeLayout
            android:id="@+id/scringoSystemWebLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <WebView
                android:id="@+id/scringoSystemWebView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#00000000" />
        </RelativeLayout>

        <TextView
            android:id="@+id/scringoSystemMessage"
            style="@style/whiteShadowedText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:textSize="14dp" />

        <ProgressBar
            android:id="@+id/scringoProgress"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:visibility="gone" />
    </RelativeLayout>

</LinearLayout>