text:
package com.google.cloud.dataflow.sdk.transforms.windowing;

import com.google.cloud.dataflow.sdk.annotations.Experimental;
import com.google.cloud.dataflow.sdk.coders.VarLongCoder;
import com.google.cloud.dataflow.sdk.transforms.Sum;
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.OnceTrigger;
import com.google.cloud.dataflow.sdk.util.ReduceFn.MergingStateContext;
import com.google.cloud.dataflow.sdk.util.ReduceFn.StateContext;
import com.google.cloud.dataflow.sdk.util.state.CombiningValueState;
import com.google.cloud.dataflow.sdk.util.state.StateContents;
import com.google.cloud.dataflow.sdk.util.state.StateTag;
import com.google.cloud.dataflow.sdk.util.state.StateTags;

import org.joda.time.Instant;

import java.util.List;
import java.util.Objects;

/**
 * {@link Trigger}s that fire based on properties of the elements in the current pane.
 *
 * @param <W> {@link BoundedWindow} subclass used to represent the windows used by this
 *            {@link Trigger}
 */
@Experimental(Experimental.Kind.TRIGGER)
public class AfterPane<W extends BoundedWindow> extends OnceTrigger<W>{

  private static final long serialVersionUID = 0L;

  private static final StateTag<CombiningValueState<Long, Long>> ELEMENTS_IN_PANE_TAG =
      StateTags.makeSystemTagInternal(StateTags.combiningValue(
          "count", VarLongCoder.of(), new Sum.SumLongFn()));

  private final int countElems;

  private AfterPane(int countElems) {
    super(null);
    this.countElems = countElems;
  }

  /**
   * Creates a trigger that fires when the pane contains at least {@code countElems} elements.
   */
  public static <W extends BoundedWindow> AfterPane<W> elementCountAtLeast(int countElems) {
    return new AfterPane<>(countElems);
  }

  @Override
  public TriggerResult onElement(OnElementContext c) throws Exception {
    CombiningValueState<Long, Long> elementsInPane = c.state().access(ELEMENTS_IN_PANE_TAG);
    StateContents<Long> countContents = elementsInPane.get();
    elementsInPane.add(1L);

    // TODO: Consider waiting to read the value until the end of a bundle, since we don't need to
    // fire immediately when the count exceeds countElems.
    long count = countContents.read();
    return count >= countElems ? TriggerResult.FIRE_AND_FINISH : TriggerResult.CONTINUE;
  }

  @Override
  public MergeResult onMerge(OnMergeContext c) throws Exception {
    // If we've already received enough elements and finished in some window, then this trigger
    // is just finished.
    if (c.trigger().finishedInAnyMergingWindow()) {
      return MergeResult.ALREADY_FINISHED;
    }

    // Otherwise, compute the sum of elements in all the active panes
    CombiningValueState<Long, Long> elementsInPane =
        c.state().accessAcrossMergingWindows(ELEMENTS_IN_PANE_TAG);
    long count = elementsInPane.get().read();
    return count >= countElems ? MergeResult.FIRE_AND_FINISH : MergeResult.CONTINUE;
  }

  @Override
  public TriggerResult onTimer(OnTimerContext c) {
    return TriggerResult.CONTINUE;
  }

  @Override
  public void prefetchOnElement(StateContext state) {
    state.access(ELEMENTS_IN_PANE_TAG).get();
  }

  @Override
  public void prefetchOnMerge(MergingStateContext state) {
    state.accessAcrossMergingWindows(ELEMENTS_IN_PANE_TAG).get();
  }

  @Override
  public void prefetchOnTimer(StateContext state) {
  }

  @Override
  public void clear(TriggerContext c) throws Exception {
    c.state().access(ELEMENTS_IN_PANE_TAG).clear();
  }

  @Override
  public boolean isCompatible(Trigger<?> other) {
    return this.equals(other);
  }

  @Override
  public Instant getWatermarkThatGuaranteesFiring(W window) {
    return BoundedWindow.TIMESTAMP_MAX_VALUE;
  }

  @Override
  public OnceTrigger<W> getContinuationTrigger(List<Trigger<W>> continuationTriggers) {
    return AfterPane.elementCountAtLeast(1);
  }

  @Override
  public String toString() {
    return "AfterPane.elementCountAtLeast(" + countElems + ")";
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (!(obj instanceof AfterPane)) {
      return false;
    }
    AfterPane<?> that = (AfterPane<?>) obj;
    return this.countElems == that.countElems;
  }

  @Override
  public int hashCode() {
    return Objects.hash(countElems);
  }
}


text:
package com.guardtime.ksi.unisignature.verifier.rules;

import com.guardtime.ksi.unisignature.CalendarHashChain;
import com.guardtime.ksi.unisignature.verifier.RuleResult;
import com.guardtime.ksi.unisignature.verifier.VerificationContext;
import com.guardtime.ksi.unisignature.verifier.VerificationErrorCode;
import com.guardtime.ksi.unisignature.verifier.VerificationResultCode;

import org.mockito.Mockito;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

public class CalendarHashChainDoesNotExistRuleTest {

    private CalendarHashChainDoesNotExistRule rule = new CalendarHashChainDoesNotExistRule();

    private VerificationContext mockedContext;

    @BeforeMethod
    public void setUp() throws Exception {
        this.mockedContext = Mockito.mock(VerificationContext.class);
    }

    @Test
    public void testVerifySignatureWithoutCalendarHashChain_Ok() throws Exception {
        Mockito.when(mockedContext.getCalendarHashChain()).thenReturn(null);
        RuleResult result = rule.verify(mockedContext);
        Assert.assertEquals(result.getResultCode(), VerificationResultCode.OK);
    }

    @Test
    public void testVerifySignatureWithCalendarHashChain_Ok() throws Exception {
        Mockito.when(mockedContext.getCalendarHashChain()).thenReturn(Mockito.mock(CalendarHashChain.class));
        RuleResult result = rule.verify(mockedContext);
        Assert.assertEquals(result.getResultCode(), VerificationResultCode.NA);
        Assert.assertEquals(result.getErrorCode(), VerificationErrorCode.GEN_02);

    }

}

redpajama_set_name: RedPajamaGithub


text:
from CommonClasses import *    # hxl: comment out this line for submission

debug = True
debug = False

class Solution:

    # @param head, a ListNode
    # @param m, an integer
    # @param n, an integer
    # @return a ListNode
    def reverseBetween(self, head, m, n):

        if head == None or head.next == None or m == n:
            return head

        # hxl: make use of a dummy head so that the case m = 1 is easy to deal with
        dummyHead = ListNode(0)
        dummyHead.next = head
        c = 1   # hxl: node counter
        cur = dummyHead

        # hxl: point cur to the node before node m
        while c < m:
            cur = cur.next
            c += 1

        nodeBeforeM = cur
        nodeM = cur.next
        cur = nodeM
        next = nodeM.next
        nextNext = next.next

        while c < n:
            next.next = cur
            cur = next
            next = nextNext
            if nextNext != None:    # hxl: watch out if the current node is the last node
                nextNext = nextNext.next
            c += 1

        nodeBeforeM.next = cur
        nodeM.next = next

        return dummyHead.next


text:
namespace client.project.timeAndExpense.maintenance.projectEmployeePositionRateMaintenance
{
    partial class employeesPopup
    {
        /// <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 Windows Form 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();
            this.gvEmployees = new System.Windows.Forms.DataGridView();
            this.EMPLOYEE = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.projectDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.effectdateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.errorMessageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.notesDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.resultCodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.crtddatetimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.crtdprogDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.crtduserDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid01DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid02DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid03DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid04DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid05DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid06DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid07DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid08DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid09DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.epid10DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.laborclasscdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.laborrateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.lupddatetimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.lupdprogDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.lupduserDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.noteidDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.user1DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.user2DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.user3DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.user4DataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.pJEMPPJTBindingSource = new System.Windows.Forms.BindingSource(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.gvEmployees)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pJEMPPJTBindingSource)).BeginInit();
            this.SuspendLayout();
            //
            // gvEmployees
            //
            this.gvEmployees.AllowUserToAddRows = false;
            this.gvEmployees.AllowUserToDeleteRows = false;
            this.gvEmployees.AllowUserToOrderColumns = true;
            this.gvEmployees.AutoGenerateColumns = false;
            this.gvEmployees.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.gvEmployees.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.EMPLOYEE,
            this.projectDataGridViewTextBoxColumn,
            this.effectdateDataGridViewTextBoxColumn,
            this.errorMessageDataGridViewTextBoxColumn,
            this.notesDataGridViewTextBoxColumn,
            this.resultCodeDataGridViewTextBoxColumn,
            this.crtddatetimeDataGridViewTextBoxColumn,
            this.crtdprogDataGridViewTextBoxColumn,
            this.crtduserDataGridViewTextBoxColumn,
            this.epid01DataGridViewTextBoxColumn,
            this.epid02DataGridViewTextBoxColumn,
            this.epid03DataGridViewTextBoxColumn,
            this.epid04DataGridViewTextBoxColumn,
            this.epid05DataGridViewTextBoxColumn,
            this.epid06DataGridViewTextBoxColumn,
            this.epid07DataGridViewTextBoxColumn,
            this.epid08DataGridViewTextBoxColumn,
            this.epid09DataGridViewTextBoxColumn,
            this.epid10DataGridViewTextBoxColumn,
            this.laborclasscdDataGridViewTextBoxColumn,
            this.laborrateDataGridViewTextBoxColumn,
            this.lupddatetimeDataGridViewTextBoxColumn,
            this.lupdprogDataGridViewTextBoxColumn,
            this.lupduserDataGridViewTextBoxColumn,
            this.noteidDataGridViewTextBoxColumn,
            this.user1DataGridViewTextBoxColumn,
            this.user2DataGridViewTextBoxColumn,
            this.user3DataGridViewTextBoxColumn,
            this.user4DataGridViewTextBoxColumn});
            this.gvEmployees.DataSource = this.pJEMPPJTBindingSource;
            this.gvEmployees.Dock = System.Windows.Forms.DockStyle.Fill;
            this.gvEmployees.Location = new System.Drawing.Point(0, 0);
            this.gvEmployees.Name = "gvEmployees";
            this.gvEmployees.ReadOnly = true;
            this.gvEmployees.RowTemplate.Height = 24;
            this.gvEmployees.Size = new System.Drawing.Size(755, 421);
            this.gvEmployees.TabIndex = 0;
            this.gvEmployees.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.gvEmployees_CellContentClick);
            //
            // EMPLOYEE
            //
            this.EMPLOYEE.DataPropertyName = "employee";
            this.EMPLOYEE.HeaderText = "employee";
            this.EMPLOYEE.Name = "EMPLOYEE";
            this.EMPLOYEE.ReadOnly = true;
            //
            // projectDataGridViewTextBoxColumn
            //
            this.projectDataGridViewTextBoxColumn.DataPropertyName = "project";
            this.projectDataGridViewTextBoxColumn.HeaderText = "project";
            this.projectDataGridViewTextBoxColumn.Name = "projectDataGridViewTextBoxColumn";
            this.projectDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // effectdateDataGridViewTextBoxColumn
            //
            this.effectdateDataGridViewTextBoxColumn.DataPropertyName = "effect_date";
            this.effectdateDataGridViewTextBoxColumn.HeaderText = "effect_date";
            this.effectdateDataGridViewTextBoxColumn.Name = "effectdateDataGridViewTextBoxColumn";
            this.effectdateDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // errorMessageDataGridViewTextBoxColumn
            //
            this.errorMessageDataGridViewTextBoxColumn.DataPropertyName = "errorMessage";
            this.errorMessageDataGridViewTextBoxColumn.HeaderText = "errorMessage";
            this.errorMessageDataGridViewTextBoxColumn.Name = "errorMessageDataGridViewTextBoxColumn";
            this.errorMessageDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // notesDataGridViewTextBoxColumn
            //
            this.notesDataGridViewTextBoxColumn.DataPropertyName = "notes";
            this.notesDataGridViewTextBoxColumn.HeaderText = "notes";
            this.notesDataGridViewTextBoxColumn.Name = "notesDataGridViewTextBoxColumn";
            this.notesDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // resultCodeDataGridViewTextBoxColumn
            //
            this.resultCodeDataGridViewTextBoxColumn.DataPropertyName = "resultCode";
            this.resultCodeDataGridViewTextBoxColumn.HeaderText = "resultCode";
            this.resultCodeDataGridViewTextBoxColumn.Name = "resultCodeDataGridViewTextBoxColumn";
            this.resultCodeDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // crtddatetimeDataGridViewTextBoxColumn
            //
            this.crtddatetimeDataGridViewTextBoxColumn.DataPropertyName = "crtd_datetime";
            this.crtddatetimeDataGridViewTextBoxColumn.HeaderText = "crtd_datetime";
            this.crtddatetimeDataGridViewTextBoxColumn.Name = "crtddatetimeDataGridViewTextBoxColumn";
            this.crtddatetimeDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // crtdprogDataGridViewTextBoxColumn
            //
            this.crtdprogDataGridViewTextBoxColumn.DataPropertyName = "crtd_prog";
            this.crtdprogDataGridViewTextBoxColumn.HeaderText = "crtd_prog";
            this.crtdprogDataGridViewTextBoxColumn.Name = "crtdprogDataGridViewTextBoxColumn";
            this.crtdprogDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // crtduserDataGridViewTextBoxColumn
            //
            this.crtduserDataGridViewTextBoxColumn.DataPropertyName = "crtd_user";
            this.crtduserDataGridViewTextBoxColumn.HeaderText = "crtd_user";
            this.crtduserDataGridViewTextBoxColumn.Name = "crtduserDataGridViewTextBoxColumn";
            this.crtduserDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid01DataGridViewTextBoxColumn
            //
            this.epid01DataGridViewTextBoxColumn.DataPropertyName = "ep_id01";
            this.epid01DataGridViewTextBoxColumn.HeaderText = "ep_id01";
            this.epid01DataGridViewTextBoxColumn.Name = "epid01DataGridViewTextBoxColumn";
            this.epid01DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid02DataGridViewTextBoxColumn
            //
            this.epid02DataGridViewTextBoxColumn.DataPropertyName = "ep_id02";
            this.epid02DataGridViewTextBoxColumn.HeaderText = "ep_id02";
            this.epid02DataGridViewTextBoxColumn.Name = "epid02DataGridViewTextBoxColumn";
            this.epid02DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid03DataGridViewTextBoxColumn
            //
            this.epid03DataGridViewTextBoxColumn.DataPropertyName = "ep_id03";
            this.epid03DataGridViewTextBoxColumn.HeaderText = "ep_id03";
            this.epid03DataGridViewTextBoxColumn.Name = "epid03DataGridViewTextBoxColumn";
            this.epid03DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid04DataGridViewTextBoxColumn
            //
            this.epid04DataGridViewTextBoxColumn.DataPropertyName = "ep_id04";
            this.epid04DataGridViewTextBoxColumn.HeaderText = "ep_id04";
            this.epid04DataGridViewTextBoxColumn.Name = "epid04DataGridViewTextBoxColumn";
            this.epid04DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid05DataGridViewTextBoxColumn
            //
            this.epid05DataGridViewTextBoxColumn.DataPropertyName = "ep_id05";
            this.epid05DataGridViewTextBoxColumn.HeaderText = "ep_id05";
            this.epid05DataGridViewTextBoxColumn.Name = "epid05DataGridViewTextBoxColumn";
            this.epid05DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid06DataGridViewTextBoxColumn
            //
            this.epid06DataGridViewTextBoxColumn.DataPropertyName = "ep_id06";
            this.epid06DataGridViewTextBoxColumn.HeaderText = "ep_id06";
            this.epid06DataGridViewTextBoxColumn.Name = "epid06DataGridViewTextBoxColumn";
            this.epid06DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid07DataGridViewTextBoxColumn
            //
            this.epid07DataGridViewTextBoxColumn.DataPropertyName = "ep_id07";
            this.epid07DataGridViewTextBoxColumn.HeaderText = "ep_id07";
            this.epid07DataGridViewTextBoxColumn.Name = "epid07DataGridViewTextBoxColumn";
            this.epid07DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid08DataGridViewTextBoxColumn
            //
            this.epid08DataGridViewTextBoxColumn.DataPropertyName = "ep_id08";
            this.epid08DataGridViewTextBoxColumn.HeaderText = "ep_id08";
            this.epid08DataGridViewTextBoxColumn.Name = "epid08DataGridViewTextBoxColumn";
            this.epid08DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid09DataGridViewTextBoxColumn
            //
            this.epid09DataGridViewTextBoxColumn.DataPropertyName = "ep_id09";
            this.epid09DataGridViewTextBoxColumn.HeaderText = "ep_id09";
            this.epid09DataGridViewTextBoxColumn.Name = "epid09DataGridViewTextBoxColumn";
            this.epid09DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // epid10DataGridViewTextBoxColumn
            //
            this.epid10DataGridViewTextBoxColumn.DataPropertyName = "ep_id10";
            this.epid10DataGridViewTextBoxColumn.HeaderText = "ep_id10";
            this.epid10DataGridViewTextBoxColumn.Name = "epid10DataGridViewTextBoxColumn";
            this.epid10DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // laborclasscdDataGridViewTextBoxColumn
            //
            this.laborclasscdDataGridViewTextBoxColumn.DataPropertyName = "labor_class_cd";
            this.laborclasscdDataGridViewTextBoxColumn.HeaderText = "labor_class_cd";
            this.laborclasscdDataGridViewTextBoxColumn.Name = "laborclasscdDataGridViewTextBoxColumn";
            this.laborclasscdDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // laborrateDataGridViewTextBoxColumn
            //
            this.laborrateDataGridViewTextBoxColumn.DataPropertyName = "labor_rate";
            this.laborrateDataGridViewTextBoxColumn.HeaderText = "labor_rate";
            this.laborrateDataGridViewTextBoxColumn.Name = "laborrateDataGridViewTextBoxColumn";
            this.laborrateDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // lupddatetimeDataGridViewTextBoxColumn
            //
            this.lupddatetimeDataGridViewTextBoxColumn.DataPropertyName = "lupd_datetime";
            this.lupddatetimeDataGridViewTextBoxColumn.HeaderText = "lupd_datetime";
            this.lupddatetimeDataGridViewTextBoxColumn.Name = "lupddatetimeDataGridViewTextBoxColumn";
            this.lupddatetimeDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // lupdprogDataGridViewTextBoxColumn
            //
            this.lupdprogDataGridViewTextBoxColumn.DataPropertyName = "lupd_prog";
            this.lupdprogDataGridViewTextBoxColumn.HeaderText = "lupd_prog";
            this.lupdprogDataGridViewTextBoxColumn.Name = "lupdprogDataGridViewTextBoxColumn";
            this.lupdprogDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // lupduserDataGridViewTextBoxColumn
            //
            this.lupduserDataGridViewTextBoxColumn.DataPropertyName = "lupd_user";
            this.lupduserDataGridViewTextBoxColumn.HeaderText = "lupd_user";
            this.lupduserDataGridViewTextBoxColumn.Name = "lupduserDataGridViewTextBoxColumn";
            this.lupduserDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // noteidDataGridViewTextBoxColumn
            //
            this.noteidDataGridViewTextBoxColumn.DataPropertyName = "noteid";
            this.noteidDataGridViewTextBoxColumn.HeaderText = "noteid";
            this.noteidDataGridViewTextBoxColumn.Name = "noteidDataGridViewTextBoxColumn";
            this.noteidDataGridViewTextBoxColumn.ReadOnly = true;
            //
            // user1DataGridViewTextBoxColumn
            //
            this.user1DataGridViewTextBoxColumn.DataPropertyName = "user1";
            this.user1DataGridViewTextBoxColumn.HeaderText = "user1";
            this.user1DataGridViewTextBoxColumn.Name = "user1DataGridViewTextBoxColumn";
            this.user1DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // user2DataGridViewTextBoxColumn
            //
            this.user2DataGridViewTextBoxColumn.DataPropertyName = "user2";
            this.user2DataGridViewTextBoxColumn.HeaderText = "user2";
            this.user2DataGridViewTextBoxColumn.Name = "user2DataGridViewTextBoxColumn";
            this.user2DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // user3DataGridViewTextBoxColumn
            //
            this.user3DataGridViewTextBoxColumn.DataPropertyName = "user3";
            this.user3DataGridViewTextBoxColumn.HeaderText = "user3";
            this.user3DataGridViewTextBoxColumn.Name = "user3DataGridViewTextBoxColumn";
            this.user3DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // user4DataGridViewTextBoxColumn
            //
            this.user4DataGridViewTextBoxColumn.DataPropertyName = "user4";
            this.user4DataGridViewTextBoxColumn.HeaderText = "user4";
            this.user4DataGridViewTextBoxColumn.Name = "user4DataGridViewTextBoxColumn";
            this.user4DataGridViewTextBoxColumn.ReadOnly = true;
            //
            // pJEMPPJTBindingSource
            //
            this.pJEMPPJTBindingSource.DataSource = typeof(client.project.timeAndExpense.maintenance.projectEmployeePositionRateMaintenance.ctDynamicsSL.project.timeAndExpense.maintenance.projectEmployeePositionRateMaintenance.PJEMPPJT);
            //
            // employeesPopup
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(755, 421);
            this.Controls.Add(this.gvEmployees);
            this.Margin = new System.Windows.Forms.Padding(4);
            this.Name = "employeesPopup";
            this.Text = "employeesPopup";
            ((System.ComponentModel.ISupportInitialize)(this.gvEmployees)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pJEMPPJTBindingSource)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.DataGridView gvEmployees;
        private System.Windows.Forms.DataGridViewTextBoxColumn EMPLOYEE;
        private System.Windows.Forms.DataGridViewTextBoxColumn projectDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn effectdateDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn errorMessageDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn notesDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn resultCodeDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn crtddatetimeDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn crtdprogDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn crtduserDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid01DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid02DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid03DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid04DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid05DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid06DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid07DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid08DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid09DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn epid10DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn laborclasscdDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn laborrateDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn lupddatetimeDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn lupdprogDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn lupduserDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn noteidDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn user1DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn user2DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn user3DataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn user4DataGridViewTextBoxColumn;
        private System.Windows.Forms.BindingSource pJEMPPJTBindingSource;
    }
}


text:
<?php

namespace Contacto\Model\Entity;
class Procesa
{
    private $nombre;
    private $apellido;
    private $telefono;
    private $correo;
    private $comentario;

    public function __construct($datos=array())
    {
        $this->nombre=$datos["nombre"];
        $this->apellido=$datos["apellido"];
        $this->correo=$datos["email"];
        $this->telefono=$datos["telefono"];
        $this->comentario=$datos["comentario"];
    }
    public function getData()
    {
        $array=array($this->nombre,$this->correo,  $this->apellido, $this->telefono, $this->comentario);
        return $array;
    }
}

?>


text:
import _ from 'lodash';
import GraphService from '../tool/GraphService';

export default {
  customers: [],
  createCustomer(email) {
    const graphQuery = `mutation{customer_create(email:"${email}"){id}}`;
    return GraphService.query(graphQuery)
      .then(response => response.customer_create);
  },
  updateCustomer(customer) {
    const graphQuery = `
mutation {
  customer_update(id: "${customer.id}", email: "${customer.email}", firstname: "${customer.firstname}", lastname: "${customer.lastname}", company: "${customer.company}") {
    id
  }
}`;
    return GraphService.query(graphQuery);
  },
  fetchCustomers() {
    const graphQuery = '{customers{id,email,firstname,lastname, company}}';
    return GraphService.query(graphQuery)
      .then((response) => {
        this.customers.length = 0;
        _.each(response.customers, x => this.customers.push(x));
      });
  },
};


text:
define([
  'svg',
  'svg.import',
  './svgView',

  './tableView',
  './commandView',

  '../models/gameModel',

  'text!../../svg/Map2.svg'
], function(
  SVG,
  svgImport,
  SVGView,

  TableView,
  CommandView,

  GameModel,

  map
) {

  var gameView = SVGView.extend({

    initialize: function() {
      this.showMap();
      this.model = new GameModel();
      this.createTable();
      this.createCommands();
      this.listenTo(this.model, 'change', this.gameModelChanged);
    },

    showMap: function() {
      var draw = SVG('drawing');
      draw.svg(map)

      var group = SVG.get('Map');
      group.scale(0.4, 0.4);
      group.each(function() {
          this.fill('#FF0000').stroke({color: '#FFF', width: 2})
      });
    },

    createTable: function() {
      this.tableView = new TableView({
        el: $("#table"),
        model: this.model
      })
    },

    createCommands: function() {
      this.commandView = new CommandView({
        el: $("#commands"),
        model: this.model
      });
    },

    gameModelChanged: function(model) {
      if (model.get('selected')) {
        $("#selected_province_name").html(model.get('selected').get('id'));
      }
    }

  })

  return gameView;
});


text:
.class public Landroid/text/SpannableString;
.super Landroid/text/SpannableStringInternal;
.source "SpannableString.java"

# interfaces
.implements Ljava/lang/CharSequence;
.implements Landroid/text/GetChars;
.implements Landroid/text/Spannable;

# direct methods
.method public constructor <init>(Ljava/lang/CharSequence;)V
    .locals 2
    .param p1, "source"    # Ljava/lang/CharSequence;

    .prologue
    .line 30
    const/4 v0, 0x0

    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v1

    invoke-direct {p0, p1, v0, v1}, Landroid/text/SpannableStringInternal;-><init>(Ljava/lang/CharSequence;II)V

    .line 31
    return-void
.end method

.method private constructor <init>(Ljava/lang/CharSequence;II)V
    .locals 0
    .param p1, "source"    # Ljava/lang/CharSequence;
    .param p2, "start"    # I
    .param p3, "end"    # I

    .prologue
    .line 34
    invoke-direct {p0, p1, p2, p3}, Landroid/text/SpannableStringInternal;-><init>(Ljava/lang/CharSequence;II)V

    .line 35
    return-void
.end method

.method public static valueOf(Ljava/lang/CharSequence;)Landroid/text/SpannableString;
    .locals 1
    .param p0, "source"    # Ljava/lang/CharSequence;

    .prologue
    .line 38
    instance-of v0, p0, Landroid/text/SpannableString;

    if-eqz v0, :cond_0

    .line 39
    check-cast p0, Landroid/text/SpannableString;

    .line 41
    .end local p0    # "source":Ljava/lang/CharSequence;
    :goto_0
    return-object p0

    .restart local p0    # "source":Ljava/lang/CharSequence;
    :cond_0
    new-instance v0, Landroid/text/SpannableString;

    invoke-direct {v0, p0}, Landroid/text/SpannableString;-><init>(Ljava/lang/CharSequence;)V

    move-object p0, v0

    goto :goto_0
.end method

# virtual methods
.method public bridge synthetic equals(Ljava/lang/Object;)Z
    .locals 1
    .param p1, "x0"    # Ljava/lang/Object;

    .prologue
    .line 25
    invoke-super {p0, p1}, Landroid/text/SpannableStringInternal;->equals(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public bridge synthetic getSpanEnd(Ljava/lang/Object;)I
    .locals 1
    .param p1, "x0"    # Ljava/lang/Object;

    .prologue
    .line 25
    invoke-super {p0, p1}, Landroid/text/SpannableStringInternal;->getSpanEnd(Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public bridge synthetic getSpanFlags(Ljava/lang/Object;)I
    .locals 1
    .param p1, "x0"    # Ljava/lang/Object;

    .prologue
    .line 25
    invoke-super {p0, p1}, Landroid/text/SpannableStringInternal;->getSpanFlags(Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public bridge synthetic getSpanStart(Ljava/lang/Object;)I
    .locals 1
    .param p1, "x0"    # Ljava/lang/Object;

    .prologue
    .line 25
    invoke-super {p0, p1}, Landroid/text/SpannableStringInternal;->getSpanStart(Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public bridge synthetic getSpans(IILjava/lang/Class;)[Ljava/lang/Object;
    .locals 1
    .param p1, "x0"    # I
    .param p2, "x1"    # I
    .param p3, "x2"    # Ljava/lang/Class;

    .prologue
    .line 25
    invoke-super {p0, p1, p2, p3}, Landroid/text/SpannableStringInternal;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic hashCode()I
    .locals 1

    .prologue
    .line 25
    invoke-super {p0}, Landroid/text/SpannableStringInternal;->hashCode()I

    move-result v0

    return v0
.end method

.method public bridge synthetic nextSpanTransition(IILjava/lang/Class;)I
    .locals 1
    .param p1, "x0"    # I
    .param p2, "x1"    # I
    .param p3, "x2"    # Ljava/lang/Class;

    .prologue
    .line 25
    invoke-super {p0, p1, p2, p3}, Landroid/text/SpannableStringInternal;->nextSpanTransition(IILjava/lang/Class;)I

    move-result v0

    return v0
.end method

.method public removeSpan(Ljava/lang/Object;)V
    .locals 0
    .param p1, "what"    # Ljava/lang/Object;

    .prologue
    .line 50
    invoke-super {p0, p1}, Landroid/text/SpannableStringInternal;->removeSpan(Ljava/lang/Object;)V

    .line 51
    return-void
.end method

.method public setSpan(Ljava/lang/Object;III)V
    .locals 0
    .param p1, "what"    # Ljava/lang/Object;
    .param p2, "start"    # I
    .param p3, "end"    # I
    .param p4, "flags"    # I

    .prologue
    .line 46
    invoke-super {p0, p1, p2, p3, p4}, Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;III)V

    .line 47
    return-void
.end method

.method public final subSequence(II)Ljava/lang/CharSequence;
    .locals 1
    .param p1, "start"    # I
    .param p2, "end"    # I

    .prologue
    .line 54
    new-instance v0, Landroid/text/SpannableString;

    invoke-direct {v0, p0, p1, p2}, Landroid/text/SpannableString;-><init>(Ljava/lang/CharSequence;II)V

    return-object v0
.end method


text:
require_relative 'response_helper'

module Asana
  module Resources
    # Public: Represents a paginated collection of Asana resources.
    class Collection
      include Enumerable
      include ResponseHelper

      attr_reader :elements

      # Public: Initializes a collection representing a page of resources of a
      # given type.
      #
      # (elements, extra) - [Array] an (String, Hash) tuple coming from the
      #                     response parser.
      # type              - [Class] the type of resource that the collection
      #                     contains. Defaults to the generic Resource.
      # client            - [Asana::Client] the client to perform requests.
      def initialize((elements, extra),
                     type: Resource,
                     client: required('client'))
        @elements       = elements.map { |elem| type.new(elem, client: client) }
        @type           = type
        @next_page_data = extra['next_page']
        @client         = client
      end

      # Public: Iterates over the elements of the collection.
      def each(&block)
        if block
          @elements.each(&block)
          (next_page || []).each(&block)
        else
          to_enum
        end
      end

      # Public: Returns the size of the collection.
      def size
        to_a.size
      end
      alias_method :length, :size

      # Public: Returns a String representation of the collection.
      def to_s
        "#<Asana::Collection<#{@type}> " \
          "[#{@elements.map(&:inspect).join(', ')}" +
          (@next_page_data ? ', ...' : '') + ']>'
      end

      alias_method :inspect, :to_s

      # Public: Returns a new Asana::Resources::Collection with the next page
      # or nil if there are no more pages. Caches the result.
      def next_page
        if defined?(@next_page)
          @next_page
        else
          @next_page = if @next_page_data
                         response = parse(@client.get(@next_page_data['path']))
                         self.class.new(response, type: @type, client: @client)
                       end
        end
      end
    end
  end
end


text:
<?php

namespace humhub\modules\user\widgets;

use Yii;
use humhub\modules\user\models\User;

/**
 * ProfileMenuWidget shows the (usually left) navigation on user profiles.
 *
 * Only a controller which uses the 'application.modules_core.user.ProfileControllerBehavior'
 * can use this widget.
 *
 * The current user can be gathered via:
 *  $user = Yii::$app->getController()->getUser();
 *
 * @package humhub.modules_core.user.widgets
 * @since 0.5
 * @author Luke
 */
class ProfileMenu extends \humhub\widgets\BaseMenu
{

    public $user;
    public $template = "@humhub/widgets/views/leftNavigation";

    public function init()
    {
        $this->addItemGroup(array(
            'id' => 'profile',
            'label' => Yii::t('UserModule.widgets_ProfileMenuWidget', 'Profile menu'),
            'sortOrder' => 100,
        ));

        $this->addItem(array(
            'label' => Yii::t('UserModule.widgets_ProfileMenuWidget', 'Stream'),
            'group' => 'profile',
            'url' => $this->user->createUrl('//user/profile'),
            'sortOrder' => 200,
            'isActive' => (Yii::$app->controller->id == "profile" && Yii::$app->controller->action->id == "index"),
        ));

        //if (Yii::$app->getController()->getUser()->profile->about != "") {
        $this->addItem(array(
            'label' => Yii::t('UserModule.widgets_ProfileMenuWidget', 'About'),
            'group' => 'profile',
            'url' => $this->user->createUrl('//user/profile/about'),
            'sortOrder' => 300,
            'isActive' => (Yii::$app->controller->id == "profile" && Yii::$app->controller->action->id == "about"),
        ));
        //}

        parent::init();
    }

    public function run()
    {
        if (Yii::$app->user->isGuest && $this->user->visibility != User::VISIBILITY_ALL) {
            return;
        }

        return parent::run();
    }

}

?>


text:
namespace cc {

class ContentLayerClient;
class DisplayListRecordingSource;
class ResourceUpdateQueue;

class CC_EXPORT PictureLayer : public Layer {
 public:
  static scoped_refptr<PictureLayer> Create(const LayerSettings& settings,
                                            ContentLayerClient* client);

  void ClearClient();

  void SetNearestNeighbor(bool nearest_neighbor);

  // Layer interface.
  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
  void SetLayerTreeHost(LayerTreeHost* host) override;
  void PushPropertiesTo(LayerImpl* layer) override;
  void SetNeedsDisplayRect(const gfx::Rect& layer_rect) override;
  bool Update() override;
  void SetIsMask(bool is_mask) override;
  skia::RefPtr<SkPicture> GetPicture() const override;
  bool IsSuitableForGpuRasterization() const override;

  void RunMicroBenchmark(MicroBenchmark* benchmark) override;

  ContentLayerClient* client() { return client_; }

  DisplayListRecordingSource* GetDisplayListRecordingSourceForTesting() {
    return recording_source_.get();
  }

 protected:
  PictureLayer(const LayerSettings& settings, ContentLayerClient* client);
  // Allow tests to inject a recording source.
  PictureLayer(const LayerSettings& settings,
               ContentLayerClient* client,
               scoped_ptr<DisplayListRecordingSource> source);
  ~PictureLayer() override;

  bool HasDrawableContent() const override;

  bool is_mask() const { return is_mask_; }

 private:
  ContentLayerClient* client_;
  scoped_ptr<DisplayListRecordingSource> recording_source_;
  devtools_instrumentation::
      ScopedLayerObjectTracker instrumentation_object_tracker_;
  // Invalidation to use the next time update is called.
  InvalidationRegion pending_invalidation_;
  // Invalidation from the last time update was called.
  Region recording_invalidation_;
  gfx::Rect last_updated_visible_layer_rect_;

  int update_source_frame_number_;
  bool is_mask_;
  bool nearest_neighbor_;

  DISALLOW_COPY_AND_ASSIGN(PictureLayer);
};

}  // namespace cc

#endif  // CC_LAYERS_PICTURE_LAYER_H_


text:
select
    clan.clan_acc 'id',
    clan.description 'name',
    clan.comment 'description',
    count(distinct membership.rfam_acc) 'family_count'
from clan
join clan_membership membership
on
    membership.clan_acc = clan.clan_acc
group by clan.clan_acc


text:
from .django_settings import *

INSTALLED_APPS += (
    # 'corsheaders',
    'wooey',
)

# MIDDLEWARE_CLASSES = [[i] if i == 'django.middleware.common.CommonMiddleware' else ['corsheaders.middleware.CorsMiddleware',i] for i in MIDDLEWARE_CLASSES]
MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES)
MIDDLEWARE_CLASSES.append('{{ project_name }}.middleware.ProcessExceptionMiddleware')

PROJECT_NAME = "{{ project_name }}"
WOOEY_CELERY_APP_NAME = 'wooey.celery'
WOOEY_CELERY_TASKS = 'wooey.tasks'


text:
TEST_F(QuickSortStrategyTests, testWithSecondaryKeys) {
  // Same as testNormal, but check secondary keys
  testUniformRecordSizeBuffer(5000, 10, 90, true);
}

void QuickSortStrategyTests::testUniformRecordSizeBuffer(
  uint64_t numRecords, uint64_t keyLength, uint64_t valueLength,
  bool secondaryKeys) {

  QuickSortStrategy strategy(secondaryKeys);

  testUniformSizeRecords(
    strategy, numRecords, keyLength, valueLength, secondaryKeys);
}

TEST_F(QuickSortStrategyTests, testNormal) {
  // Run with 5000 records, with key length 10 and value length 90
  testUniformRecordSizeBuffer(5000, 10, 90, false);
}


text:
import os

import mock
import pytest

from datadog_checks.cert_manager import CertManagerCheck
from datadog_checks.dev.http import MockResponse

from .common import ACME_METRICS, CERT_METRICS, CONTROLLER_METRICS, MOCK_INSTANCE

@pytest.fixture()
def error_metrics():
    with mock.patch(
        'requests.get',
        return_value=mock.MagicMock(status_code=502, headers={'Content-Type': "text/plain"}),
    ):
        yield

@pytest.mark.unit
def test_config():
    # this should not fail
    CertManagerCheck('cert_manager', {}, [MOCK_INSTANCE])

@pytest.mark.unit
def test_check(aggregator, dd_run_check):
    check = CertManagerCheck('cert_manager', {}, [MOCK_INSTANCE])

    def mock_requests_get(url, *args, **kwargs):
        return MockResponse(file_path=os.path.join(os.path.dirname(__file__), 'fixtures', 'cert_manager.txt'))

    with mock.patch('requests.get', side_effect=mock_requests_get, autospec=True):
        dd_run_check(check)

    expected_metrics = dict(CERT_METRICS)
    expected_metrics.update(CONTROLLER_METRICS)
    expected_metrics.update(ACME_METRICS)

    for metric_name, metric_type in expected_metrics.items():
        aggregator.assert_metric(metric_name, metric_type=metric_type)

    aggregator.assert_all_metrics_covered()

    aggregator.assert_service_check(
        'cert_manager.openmetrics.health',
        status=CertManagerCheck.OK,
        tags=['endpoint:http://fake.tld/prometheus'],
        count=1,
    )

@pytest.mark.unit
def test_openmetrics_error(aggregator, instance, error_metrics):
    check = CertManagerCheck('cert_manager', {}, [MOCK_INSTANCE])
    with pytest.raises(Exception):
        check.check(MOCK_INSTANCE)
        aggregator.assert_service_check(
            'cert_manager.openmetrics.health',
            status=CertManagerCheck.CRITICAL,
            tags=['endpoint:http://fake.tld/prometheus'],
            count=1,
        )


text:
package org.elasticsearch.index.fielddata.plain;

import org.apache.lucene.util.FixedBitSet;
import org.apache.lucene.util.RamUsageEstimator;
import org.elasticsearch.common.util.DoubleArray;
import org.elasticsearch.index.fielddata.*;
import org.elasticsearch.index.fielddata.ordinals.Ordinals;

/**
 */
public abstract class DoubleArrayAtomicFieldData extends AbstractAtomicNumericFieldData {

    public static DoubleArrayAtomicFieldData empty() {
        return new Empty();
    }

    protected long size = -1;

    public DoubleArrayAtomicFieldData() {
        super(true);
    }

    @Override
    public void close() {
    }

    static class Empty extends DoubleArrayAtomicFieldData {

        Empty() {
            super();
        }

        @Override
        public LongValues getLongValues() {
            return LongValues.EMPTY;
        }

        @Override
        public DoubleValues getDoubleValues() {
            return DoubleValues.EMPTY;
        }

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

        @Override
        public BytesValues getBytesValues() {
            return BytesValues.EMPTY;
        }

        @Override
        public ScriptDocValues getScriptValues() {
            return ScriptDocValues.EMPTY_DOUBLES;
        }
    }

    public static class WithOrdinals extends DoubleArrayAtomicFieldData {

        private final DoubleArray values;
        private final Ordinals ordinals;

        public WithOrdinals(DoubleArray values, Ordinals ordinals) {
            super();
            this.values = values;
            this.ordinals = ordinals;
        }

        @Override
        public long getMemorySizeInBytes() {
            if (size == -1) {
                size = RamUsageEstimator.NUM_BYTES_INT/*size*/ + values.sizeInBytes() + ordinals.getMemorySizeInBytes();
            }
            return size;
        }

        @Override
        public LongValues getLongValues() {
            return new LongValues(values, ordinals.ordinals());
        }

        @Override
        public DoubleValues getDoubleValues() {
            return new DoubleValues(values, ordinals.ordinals());
        }

        static class LongValues extends org.elasticsearch.index.fielddata.LongValues.WithOrdinals {

            private final DoubleArray values;

            LongValues(DoubleArray values, BytesValues.WithOrdinals ordinals) {
                super(ordinals);
                this.values = values;
            }

            @Override
            public final long getValueByOrd(long ord) {
                assert ord != BytesValues.WithOrdinals.MISSING_ORDINAL;
                return (long) values.get(ord);
            }
        }

        static class DoubleValues extends org.elasticsearch.index.fielddata.DoubleValues.WithOrdinals {

            private final DoubleArray values;

            DoubleValues(DoubleArray values, BytesValues.WithOrdinals ordinals) {
                super(ordinals);
                this.values = values;
            }

            @Override
            public double getValueByOrd(long ord) {
                assert ord != BytesValues.WithOrdinals.MISSING_ORDINAL;
                return values.get(ord);
            }
        }
    }

    /**
     * A single valued case, where not all values are "set", so we have a FixedBitSet that
     * indicates which values have an actual value.
     */
    public static class SingleFixedSet extends DoubleArrayAtomicFieldData {

        private final DoubleArray values;
        private final FixedBitSet set;

        public SingleFixedSet(DoubleArray values, FixedBitSet set) {
            super();
            this.values = values;
            this.set = set;
        }

        @Override
        public long getMemorySizeInBytes() {
            if (size == -1) {
                size = RamUsageEstimator.NUM_BYTES_ARRAY_HEADER + values.sizeInBytes() + RamUsageEstimator.sizeOf(set.getBits());
            }
            return size;
        }

        @Override
        public LongValues getLongValues() {
            return new LongValues(values, set);
        }

        @Override
        public DoubleValues getDoubleValues() {
            return new DoubleValues(values, set);
        }

        static class LongValues extends org.elasticsearch.index.fielddata.LongValues {

            private final DoubleArray values;
            private final FixedBitSet set;

            LongValues(DoubleArray values, FixedBitSet set) {
                super(false);
                this.values = values;
                this.set = set;
            }

            @Override
            public int setDocument(int docId) {
                this.docId = docId;
                return  set.get(docId) ? 1 : 0;
            }

            @Override
            public long nextValue() {
                return (long) values.get(docId);
            }
            }

        static class DoubleValues extends org.elasticsearch.index.fielddata.DoubleValues {

            private final DoubleArray values;
            private final FixedBitSet set;

            DoubleValues(DoubleArray values, FixedBitSet set) {
                super(false);
                this.values = values;
                this.set = set;
            }

            @Override
            public int setDocument(int docId) {
                this.docId = docId;
                return set.get(docId) ? 1 : 0;
            }

            @Override
            public double nextValue() {
                return values.get(docId);
            }
        }
    }

    /**
     * Assumes all the values are "set", and docId is used as the index to the value array.
     */
    public static class Single extends DoubleArrayAtomicFieldData {

        private final DoubleArray values;

        /**
         * Note, here, we assume that there is no offset by 1 from docId, so position 0
         * is the value for docId 0.
         */
        public Single(DoubleArray values) {
            super();
            this.values = values;
        }

        @Override
        public long getMemorySizeInBytes() {
            if (size == -1) {
                size = RamUsageEstimator.NUM_BYTES_ARRAY_HEADER + values.sizeInBytes();
            }
            return size;
        }

        @Override
        public LongValues getLongValues() {
            return new LongValues(values);
        }

        @Override
        public DoubleValues getDoubleValues() {
            return new DoubleValues(values);
        }

        static final class LongValues extends DenseLongValues {

            private final DoubleArray values;

            LongValues(DoubleArray values) {
                super(false);
                this.values = values;
            }

            @Override
            public long nextValue() {
                return (long) values.get(docId);
            }
        }

        static final class DoubleValues extends DenseDoubleValues {

            private final DoubleArray values;

            DoubleValues(DoubleArray values) {
                super(false);
                this.values = values;
            }

            @Override
            public double nextValue() {
                return values.get(docId);
            }

        }
    }
}


text:
<?php echo Form::open(array("class"=>"form-horizontal")); ?>

	<fieldset>

			<?php echo Form::label('Title', 'title', array('class'=>'control-label')); ?>

				<?php echo Form::input('title', Input::post('title', isset($marque) ? $marque->title : ''), array('class' => 'col-md-4 form-control', 'placeholder'=>'Title')); ?>

			<?php echo Form::submit('submit', 'Save', array('class' => 'btn btn-primary')); ?>

	</fieldset>
<?php echo Form::close(); ?>


text:
external help file: Microsoft.Azure.Commands.ResourceManager.Automation.dll-Help.xml
Module Name: AzureRM.Automation
ms.assetid: B2D9FF7B-EA3B-4853-814C-00FC4E328957
online version: https://docs.microsoft.com/en-us/powershell/module/azurerm.automation/start-azurermautomationrunbook
schema: 2.0.0
---

# Start-AzureRmAutomationRunbook

## SYNOPSIS
Starts a runbook job.

## SYNTAX

### ByAsynchronousReturnJob (Default)
```
Start-AzureRmAutomationRunbook [-Name] <String> [-Parameters <IDictionary>] [-RunOn <String>]
 [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]
```

### BySynchronousReturnJobOutput
```
Start-AzureRmAutomationRunbook [-Name] <String> [-Parameters <IDictionary>] [-RunOn <String>] [-Wait]
 [-MaxWaitSeconds <Int32>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

## DESCRIPTION
The **Start-AzureRmAutomationRunbook** cmdlet starts an Azure Automation runbook job.
Specify the ID or name of a runbook.

## EXAMPLES

### Example 1: Start a runbook job
```
PS C:\>Start-AzureRmAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ResourceGroupName "ResourceGroup01"
```

This command starts a runbook job for the runbook named Runbk01 in the Azure Automation account named Contoso17.

### Example 2: Start a runbook job and wait for results
```
Start-AzureRmAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ResourceGroupName "ResourceGroup01" -MaxWaitSeconds 1000 -Wait
```

This command starts a runbook job for the runbook named Runbk01 in the Azure Automation account named Contoso17.
This command specifies the _Wait_ parameter.
Therefore, it returns results after the job is completed.
The cmdlet waits up to 1000 seconds for the results.

## PARAMETERS

### -AutomationAccountName
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

```yaml
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -MaxWaitSeconds
Specifies the number of seconds this cmdlet waits for a job to finish before it abandons the job.
The default value is 10800, or three hours.

```yaml
Type: System.Int32
Parameter Sets: BySynchronousReturnJobOutput
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Name
```yaml
Type: System.String
Parameter Sets: (All)
Aliases: RunbookName

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Parameters
```yaml
Type: System.Collections.IDictionary
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ResourceGroupName
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -RunOn
Specifies which Hybrid Worker Group on which to run the runbook.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases: HybridWorker

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Wait
Indicates that this cmdlet waits for job to complete, suspend, or fail, and then returns control to Azure PowerShell.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: BySynchronousReturnJobOutput
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

## OUTPUTS

### Microsoft.Azure.Commands.Automation.Model.Job
-This cmdlet returns a **Job** object, unless you specify the _Wait_ parameter.
-If you do not specify _Wait_, Azure PowerShell returns a **Job** object immediately.
-If you specify _Wait_, Azure PowerShell completes the job, and then returns the result.
-The result is not a **Job** object.

### System.Management.Automation.PSObject

## NOTES

## RELATED LINKS

[Export-AzureRmAutomationRunbook](./Export-AzureRMAutomationRunbook.md)

[Get-AzureRmAutomationRunbook](./Get-AzureRMAutomationRunbook.md)

[Import-AzureRmAutomationRunbook](./Import-AzureRMAutomationRunbook.md)

[New-AzureRmAutomationRunbook](./New-AzureRMAutomationRunbook.md)

[New-AzureRmAutomationRunbook](./New-AzureRMAutomationRunbook.md)

[Publish-AzureRmAutomationRunbook](./Publish-AzureRMAutomationRunbook.md)

[Remove-AzureRmAutomationRunbook](./Remove-AzureRMAutomationRunbook.md)

[Set-AzureRmAutomationRunbook](./Set-AzureRMAutomationRunbook.md)


text:
package org.apache.commons.net.ssh.connection;

import java.io.IOException;
import java.net.Socket;
import java.net.SocketAddress;

import org.apache.commons.net.ssh.util.StreamCopier;
import org.apache.commons.net.ssh.util.StreamCopier.ErrorCallback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * A {@link ConnectListener} that forwards what is received over the channel to a socket and vice-versa.
 */
public class SocketForwardingConnectListener implements ConnectListener
{

    protected final Logger log = LoggerFactory.getLogger(getClass());

    protected final SocketAddress addr;

    /**
     * Create with a {@link SocketAddress} this listener will forward to.
     */
    public SocketForwardingConnectListener(SocketAddress addr)
    {
        this.addr = addr;
    }

    /**
     * On connect, confirm the channel and start forwarding.
     */
    public void gotConnect(Channel.Forwarded chan) throws IOException
    {
        log.info("New connection from " + chan.getOriginatorIP() + ":" + chan.getOriginatorPort());

        final Socket sock = new Socket();
        sock.setSendBufferSize(chan.getLocalMaxPacketSize());
        sock.setReceiveBufferSize(chan.getRemoteMaxPacketSize());

        sock.connect(addr);

        // ok so far -- could connect, let's confirm the channel
        chan.confirm();

        final ErrorCallback chanCloser = StreamCopier.closeOnErrorCallback(chan);

        new StreamCopier("soc2chan", sock.getInputStream(), chan.getOutputStream()) //
                .bufSize(chan.getRemoteMaxPacketSize()) //
                .errorCallback(chanCloser) //
                .daemon(true) //
                .start();

        new StreamCopier("chan2soc", chan.getInputStream(), sock.getOutputStream()) //
                .bufSize(chan.getLocalMaxPacketSize()) //
                .errorCallback(chanCloser) //
                .daemon(true) //
                .start();
    }

}


text:
#ifndef SPINE_CCSKELETONANIMATION_H_
#define SPINE_CCSKELETONANIMATION_H_

#include <spine/spine.h>
#include <spine/CCSkeleton.h>
#include "cocos2d.h"

namespace spine {

class CCSkeletonAnimation;
typedef void (cocos2d::CCObject::*SEL_AnimationStateEvent)(spine::CCSkeletonAnimation* node, int trackIndex, spEventType type, spEvent* event, int loopCount);
#define animationStateEvent_selector(_SELECTOR) (SEL_AnimationStateEvent)(&_SELECTOR)

/** Draws an animated skeleton, providing an AnimationState for applying one or more animations and queuing animations to be
  * played later. */
class CCSkeletonAnimation: public CCSkeleton {
public:
	spAnimationState* state;

	static CCSkeletonAnimation* createWithData (spSkeletonData* skeletonData);
	static CCSkeletonAnimation* createWithFile (const char* skeletonDataFile, spAtlas* atlas, float scale = 0);
	static CCSkeletonAnimation* createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale = 0);

	CCSkeletonAnimation (spSkeletonData* skeletonData);
	CCSkeletonAnimation (const char* skeletonDataFile, spAtlas* atlas, float scale = 0);
	CCSkeletonAnimation (const char* skeletonDataFile, const char* atlasFile, float scale = 0);

	virtual ~CCSkeletonAnimation ();

	virtual void update (float deltaTime);

	void setAnimationStateData (spAnimationStateData* stateData);
	void setMix (const char* fromAnimation, const char* toAnimation, float duration);

	void setAnimationListener (CCObject* instance, SEL_AnimationStateEvent method);
	spTrackEntry* setAnimation (int trackIndex, const char* name, bool loop);
	spTrackEntry* addAnimation (int trackIndex, const char* name, bool loop, float delay = 0);
	spTrackEntry* getCurrent (int trackIndex = 0);
	void clearTracks ();
	void clearTrack (int trackIndex = 0);

	virtual void onAnimationStateEvent (int trackIndex, spEventType type, spEvent* event, int loopCount);

protected:
	CCSkeletonAnimation ();

private:
	typedef CCSkeleton super;
	CCObject* listenerInstance;
	SEL_AnimationStateEvent listenerMethod;
	bool ownsAnimationStateData;

	void initialize ();
};

}

#endif /* SPINE_CCSKELETONANIMATION_H_ */


text:
/*
http://www.cgsoso.com/forum-211-1.html

CG搜搜 Unity3d 每日Unity3d插件免费更新 更有VIP资源!

CGSOSO 主打游戏开发,影视设计等CG资源素材。

插件如若商用,请务必官网购买!

daily assets update for try.

U should buy the asset from home store if u use it in your project!
*/

#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)

using System;

namespace Org.BouncyCastle.Security
{
#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || NETFX_CORE)
    [Serializable]
#endif
    public class SecurityUtilityException
		: Exception
    {
        /**
        * base constructor.
        */
        public SecurityUtilityException()
        {
        }

		/**
         * create a SecurityUtilityException with the given message.
         *
         * @param message the message to be carried with the exception.
         */
        public SecurityUtilityException(
            string message)
			: base(message)
        {
        }

		public SecurityUtilityException(
            string		message,
            Exception	exception)
			: base(message, exception)
        {
        }
    }
}

#endif


text:
require "nacre/abstract_resource"

module Nacre
  class Product::TaxCode < AbstractResource

    attribute :id
    attribute :code

  end
end


text:
@class QBBaseModule;
@class QBRestRequest;
@class RestAnswer;
@protocol Cancelable;
@protocol QBActionStatusDelegate;

@interface QBQuery : NSObject<Perform,RestRequestDelegate,Cancelable, QBActionStatusDelegate>
{
	NSObject<QBActionStatusDelegate> *delegate;
	NSObject<Cancelable> *canceler;
	BOOL isCanceled;
	NSRecursiveLock *canceledLock;
	id context;
	enum RestRequestBuildStyle requestBuildStyle;
}
@property (nonatomic,retain) NSObject<QBActionStatusDelegate> *delegate;
@property (nonatomic,retain) NSObject<Cancelable> *canceler;
@property (nonatomic,retain) NSRecursiveLock *canceledLock;
@property (nonatomic,retain) id context;
@property (nonatomic) enum RestRequestBuildStyle requestBuildStyle;

- (RestAnswer *)allocAnswer;
- (NSString *)url;
- (void)finishedSuccess;

- (void)setupRequest:(QBRestRequest *)request;
- (void)setUrl:(QBRestRequest *)request;
- (void)setBody:(QBRestRequest *)request;
- (void)setParams:(QBRestRequest *)request;
- (void)setHeaders:(QBRestRequest *)request;
- (void)setMethod:(QBRestRequest *)request;
- (void)setFiles:(QBRestRequest *)request;

@end


text:
@interface NSDictionary (LNLog)

@end


text:
package com.studly.util;

import java.util.Arrays;
import java.util.List;

import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;

public final class AccountUtils {

    private static final String TAG = "AccountUtils";
    private static final String PREF_CHOSEN_ACCOUNT = "chosen_account";

    public static final String GOOGLE_ACCOUNT_TYPE = "com.google";

    private AccountUtils() {
    }

    public static List<Account> getAccounts(final Context context) {
        AccountManager accountManager = AccountManager.get(context);
        return Arrays.asList(accountManager.getAccountsByType(GOOGLE_ACCOUNT_TYPE));
    }

    public static String getChosenAccountName(final Context context) {
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
        return sp.getString(PREF_CHOSEN_ACCOUNT, null);
    }

    public static boolean isAuthenticated(final Context context) {
        return !TextUtils.isEmpty(getChosenAccountName(context));
    }

    public static void setChosenAccountName(final Context context, final String accountName) {
        Log.d(TAG, "Chose account " + accountName);
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
        sp.edit().putString(PREF_CHOSEN_ACCOUNT, accountName).commit();
    }
}


text:
// @flow
/**
 * This module is an entry point of planck app
 * @module App
 */
import http from 'http';
import pathModule from 'path';
import express from 'express';
import bodyParser from 'body-parser';

import Config from '../config';
import '../error';

import { RouterHTTP } from '../router';
import CodeGenerator from '../code-generator/code-generator';

function useExpressAppMiddleware(middleware) {
	return this.httpApp.use(middleware);
}

function patchLoader() {
	if (!this.config.codeGeneration.autoGeneration) {
		return;
	}
	const oldFetch = Reflect.Loader[Reflect.Loader.fetch];
	const app = this;
	Reflect.Loader[Reflect.Loader.fetch] = async function fetch(entry, key, ...rest) {
		const configPath = pathModule.join(process.cwd(), app.config.models.path);
		const path = configPath;
		const index = key.indexOf(path);
		if (index !== -1) {
			let name = key.slice(index + path.length, key.length);
			name = pathModule.basename(name, '.js');
			await app.codeGenerator.fireTrigger('NEW_MODEL', { name });
		}
		return Reflect.apply(oldFetch, this, [entry, key, ...rest]);
	};
}

/**
 * App class is the main class and entry point of planck app
 */
class App {
	httpApp = null;
	config = null;
	dbProviderPool = null;
	httpServer = null;
	codeGenerator = null;

	/**
	 * Tell app to use helper/midllware/router etc
	 * @param {function} target helper to use
	 */
	async use(target: Function) {
		if (RouterHTTP.isPrototypeOf(target)) {
			return target.create(this);
		}
		if ((typeof target === 'function') && (target.length === 3 || target.length === 4)) {
			return Reflect.apply(useExpressAppMiddleware, this, [target]);
		}
	}

	/**
	 * Starting server after all manual configuration
	 */
	async start(config: string | Object) {
		if (this.httpApp) {
			throw new Error('Can not start application - application is already running');
		}
		this.config = await Config.create(config);
		this.codeGenerator = await CodeGenerator.create(this);
		Reflect.apply(patchLoader, this, []);
		await new Promise((resolve, reject) => {
			this.httpApp = express();
			if (this.config.bodyParser !== false) {
				this.httpApp.use(bodyParser.json(this.config.bodyParser));
			}
			this.httpServer = http.createServer(this.httpApp);
			this.httpServer.on('error', reject);
			this.httpServer.listen(this.config.http.port, () => {
				console.info(`Server started on ${this.config.http.port} port`);
				RouterHTTP.prototype.httpServer = this.httpServer;
				this.httpServer.on('error', App.printError);
				resolve();
			});
		});
	}

	static printError(err: Error) {
		console.error(err.stack);
	}
}

export default App;


text:
package org.apache.nutch.crawl;

import org.apache.avro.util.Utf8;
import org.apache.gora.mapreduce.GoraOutputFormat;
import org.apache.gora.persistency.Persistent;
import org.apache.gora.store.DataStore;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.apache.nutch.metadata.Nutch;
import org.apache.nutch.net.URLFilters;
import org.apache.nutch.net.URLNormalizers;
import org.apache.nutch.scoring.ScoringFilterException;
import org.apache.nutch.scoring.ScoringFilters;
import org.apache.nutch.storage.Mark;
import org.apache.nutch.storage.StorageUtils;
import org.apache.nutch.storage.WebPage;
import org.apache.nutch.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * This class takes a flat file of URLs and adds them to the of pages to be
 * crawled. Useful for bootstrapping the system. The URL files contain one URL
 * per line, optionally followed by custom metadata separated by tabs with the
 * metadata key separated from the corresponding value by '='.

 * Note that some metadata keys are reserved :

 * - nutch.score : allows to set a custom score for a specific URL

 * - nutch.fetchInterval : allows to set a custom fetch interval for a
 * specific URL

 * e.g. http://www.nutch.org/ \t nutch.score=10 \t nutch.fetchInterval=2592000
 * \t userType=open_source
 **/
public class InjectorJob extends NutchTool implements Tool {

  public static final Logger LOG = LoggerFactory.getLogger(InjectorJob.class);

  private static final Set<WebPage.Field> FIELDS = new HashSet<WebPage.Field>();

  private static final Utf8 YES_STRING = new Utf8("y");

  static {
    FIELDS.add(WebPage.Field.MARKERS);
    FIELDS.add(WebPage.Field.STATUS);
  }

  /** metadata key reserved for setting a custom score for a specific URL */
  public static String nutchScoreMDName = "nutch.score";
  /**
   * metadata key reserved for setting a custom fetchInterval for a specific URL
   */
  public static String nutchFetchIntervalMDName = "nutch.fetchInterval";

  public static class UrlMapper extends
      Mapper<LongWritable, Text, String, WebPage> {
    private URLNormalizers urlNormalizers;
    private int interval;
    private float scoreInjected;
    private URLFilters filters;
    private ScoringFilters scfilters;
    private long curTime;

    @Override
    protected void setup(Context context) throws IOException,
        InterruptedException {
      urlNormalizers = new URLNormalizers(context.getConfiguration(),
          URLNormalizers.SCOPE_INJECT);
      interval = context.getConfiguration().getInt("db.fetch.interval.default",
          2592000);
      filters = new URLFilters(context.getConfiguration());
      scfilters = new ScoringFilters(context.getConfiguration());
      scoreInjected = context.getConfiguration().getFloat("db.score.injected",
          1.0f);
      curTime = context.getConfiguration().getLong("injector.current.time",
          System.currentTimeMillis());
    }

    protected void map(LongWritable key, Text value, Context context)
        throws IOException, InterruptedException {
      String url = value.toString().trim(); // value is line of text

      if (url != null && (url.length() == 0 || url.startsWith("#"))) {
        /* Ignore line that start with # */
        return;
      }

      // if tabs : metadata that could be stored
      // must be name=value and separated by \t
      float customScore = -1f;
      int customInterval = interval;
      Map<String, String> metadata = new TreeMap<String, String>();
      if (url.indexOf("\t") != -1) {
        String[] splits = url.split("\t");
        url = splits[0];
        for (int s = 1; s < splits.length; s++) {
          // find separation between name and value
          int indexEquals = splits[s].indexOf("=");
          if (indexEquals == -1) {
            // skip anything without a =
            continue;
          }
          String metaname = splits[s].substring(0, indexEquals);
          String metavalue = splits[s].substring(indexEquals + 1);
          if (metaname.equals(nutchScoreMDName)) {
            try {
              customScore = Float.parseFloat(metavalue);
            } catch (NumberFormatException nfe) {
            }
          } else if (metaname.equals(nutchFetchIntervalMDName)) {
            try {
              customInterval = Integer.parseInt(metavalue);
            } catch (NumberFormatException nfe) {
            }
          } else
            metadata.put(metaname, metavalue);
        }
      }
      try {
        url = urlNormalizers.normalize(url, URLNormalizers.SCOPE_INJECT);
        url = filters.filter(url); // filter the url
      } catch (Exception e) {
        LOG.warn("Skipping " + url + ":" + e);
        url = null;
      }
      if (url == null) {
        context.getCounter("injector", "urls_filtered").increment(1);
        return;
      } else { // if it passes
        String reversedUrl = TableUtil.reverseUrl(url); // collect it
        WebPage row = WebPage.newBuilder().build();
        row.setFetchTime(curTime);
        row.setFetchInterval(customInterval);

        // now add the metadata
        Iterator<String> keysIter = metadata.keySet().iterator();
        while (keysIter.hasNext()) {
          String keymd = keysIter.next();
          String valuemd = metadata.get(keymd);
          row.getMetadata().put(new Utf8(keymd),
              ByteBuffer.wrap(valuemd.getBytes()));
        }

        if (customScore != -1)
          row.setScore(customScore);
        else
          row.setScore(scoreInjected);

        try {
          scfilters.injectedScore(url, row);
        } catch (ScoringFilterException e) {
          if (LOG.isWarnEnabled()) {
            LOG.warn("Cannot filter injected score for url " + url
                + ", using default (" + e.getMessage() + ")");
          }
        }
        context.getCounter("injector", "urls_injected").increment(1);
        row.getMarkers()
            .put(DbUpdaterJob.DISTANCE, new Utf8(String.valueOf(0)));
        Mark.INJECT_MARK.putMark(row, YES_STRING);
        context.write(reversedUrl, row);
      }
    }
  }

  public InjectorJob() {
  }

  public InjectorJob(Configuration conf) {
    setConf(conf);
  }

  public Map<String, Object> run(Map<String, Object> args) throws Exception {
    getConf().setLong("injector.current.time", System.currentTimeMillis());
    Path input;
    Object path = args.get(Nutch.ARG_SEEDDIR);
    if (path instanceof Path) {
      input = (Path) path;
    } else {
      input = new Path(path.toString());
    }
    numJobs = 1;
    currentJobNum = 0;
    currentJob = new NutchJob(getConf(), "inject " + input);
    FileInputFormat.addInputPath(currentJob, input);
    currentJob.setMapperClass(UrlMapper.class);
    currentJob.setMapOutputKeyClass(String.class);
    currentJob.setMapOutputValueClass(WebPage.class);
    currentJob.setOutputFormatClass(GoraOutputFormat.class);

    DataStore<String, WebPage> store = StorageUtils.createWebStore(
        currentJob.getConfiguration(), String.class, WebPage.class);
    GoraOutputFormat.setOutput(currentJob, store, true);

    // NUTCH-1471 Make explicit which datastore class we use
    Class<? extends DataStore<Object, Persistent>> dataStoreClass = StorageUtils
        .getDataStoreClass(currentJob.getConfiguration());
    LOG.info("InjectorJob: Using " + dataStoreClass
        + " as the Gora storage class.");

    currentJob.setReducerClass(Reducer.class);
    currentJob.setNumReduceTasks(0);

    currentJob.waitForCompletion(true);
    ToolUtil.recordJobStatus(null, currentJob, results);

    // NUTCH-1370 Make explicit #URLs injected @runtime
    long urlsInjected = currentJob.getCounters()
        .findCounter("injector", "urls_injected").getValue();
    long urlsFiltered = currentJob.getCounters()
        .findCounter("injector", "urls_filtered").getValue();
    LOG.info("InjectorJob: total number of urls rejected by filters: "
        + urlsFiltered);
    LOG.info("InjectorJob: total number of urls injected after normalization and filtering: "
        + urlsInjected);

    return results;
  }

  public void inject(Path urlDir) throws Exception {
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    long start = System.currentTimeMillis();
    LOG.info("InjectorJob: starting at " + sdf.format(start));
    LOG.info("InjectorJob: Injecting urlDir: " + urlDir);
    run(ToolUtil.toArgMap(Nutch.ARG_SEEDDIR, urlDir));
    long end = System.currentTimeMillis();
    LOG.info("Injector: finished at " + sdf.format(end) + ", elapsed: "
        + TimingUtil.elapsedTime(start, end));
  }

  @Override
  public int run(String[] args) throws Exception {
    if (args.length < 1) {
      System.err.println("Usage: InjectorJob <url_dir> [-crawlId <id>]");
      return -1;
    }
    for (int i = 1; i < args.length; i++) {
      if ("-crawlId".equals(args[i])) {
        getConf().set(Nutch.CRAWL_ID_KEY, args[i + 1]);
        i++;
      } else {
        System.err.println("Unrecognized arg " + args[i]);
        return -1;
      }
    }

    try {
      inject(new Path(args[0]));
      return -0;
    } catch (Exception e) {
      LOG.error("InjectorJob: " + StringUtils.stringifyException(e));
      return -1;
    }
  }

  public static void main(String[] args) throws Exception {
    int res = ToolRunner.run(NutchConfiguration.create(), new InjectorJob(),
        args);
    System.exit(res);
  }
}


text:
<?php

namespace Zend\Navigation\Service;

use Interop\Container\ContainerInterface;
use Traversable;
use Zend\Config;
use Zend\Http\Request;
use Zend\Mvc\Router as MvcRouter;
use Zend\Navigation\Exception;
use Zend\Navigation\Navigation;
use Zend\Router\RouteMatch;
use Zend\Router\RouteStackInterface as Router;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Stdlib\ArrayUtils;

/**
 * Abstract navigation factory
 */
abstract class AbstractNavigationFactory implements FactoryInterface
{
    /**
     * @var array
     */
    protected $pages;

    /**
     * Create and return a new Navigation instance (v3).
     *
     * @param ContainerInterface $container
     * @param string $requestedName
     * @param null|array $options
     * @return Navigation
     */
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
    {
        return new Navigation($this->getPages($container));
    }

    /**
     * Create and return a new Navigation instance (v2).
     *
     * @param ServiceLocatorInterface $container
     * @param null|string $name
     * @param null|string $requestedName
     * @return Navigation
     */
    public function createService(ServiceLocatorInterface $container)
    {
        return $this($container, Navigation::class);
    }

    /**
     * @abstract
     * @return string
     */
    abstract protected function getName();

    /**
     * @param ContainerInterface $container
     * @return array
     * @throws \Zend\Navigation\Exception\InvalidArgumentException
     */
    protected function getPages(ContainerInterface $container)
    {
        if (null === $this->pages) {
            $configuration = $container->get('config');

            if (! isset($configuration['navigation'])) {
                throw new Exception\InvalidArgumentException('Could not find navigation configuration key');
            }
            if (! isset($configuration['navigation'][$this->getName()])) {
                throw new Exception\InvalidArgumentException(sprintf(
                    'Failed to find a navigation container by the name "%s"',
                    $this->getName()
                ));
            }

            $pages       = $this->getPagesFromConfig($configuration['navigation'][$this->getName()]);
            $this->pages = $this->preparePages($container, $pages);
        }
        return $this->pages;
    }

    /**
     * @param ContainerInterface $container
     * @param array|\Zend\Config\Config $pages
     * @return null|array
     * @throws \Zend\Navigation\Exception\InvalidArgumentException
     */
    protected function preparePages(ContainerInterface $container, $pages)
    {
        $application = $container->get('Application');
        $routeMatch  = $application->getMvcEvent()->getRouteMatch();
        $router      = $application->getMvcEvent()->getRouter();
        $request     = $application->getMvcEvent()->getRequest();

        // HTTP request is the only one that may be injected
        if (! $request instanceof Request) {
            $request = null;
        }

        return $this->injectComponents($pages, $routeMatch, $router, $request);
    }

    /**
     * @param string|\Zend\Config\Config|array $config
     * @return array|null|\Zend\Config\Config
     * @throws \Zend\Navigation\Exception\InvalidArgumentException
     */
    protected function getPagesFromConfig($config = null)
    {
        if (is_string($config)) {
            if (! file_exists($config)) {
                throw new Exception\InvalidArgumentException(sprintf(
                    'Config was a string but file "%s" does not exist',
                    $config
                ));
            }
            $config = Config\Factory::fromFile($config);
        } elseif ($config instanceof Traversable) {
            $config = ArrayUtils::iteratorToArray($config);
        } elseif (! is_array($config)) {
            throw new Exception\InvalidArgumentException(
                'Invalid input, expected array, filename, or Traversable object'
            );
        }

        return $config;
    }

    /**
     * @param array $pages
     * @param RouteMatch|MvcRouter\RouteMatch $routeMatch
     * @param Router|MvcRouter\RouteStackInterface $router
     * @param null|Request $request
     * @return array
     */
    protected function injectComponents(
        array $pages,
        $routeMatch = null,
        $router = null,
        $request = null
    ) {
        $this->validateRouteMatch($routeMatch);
        $this->validateRouter($router);

        foreach ($pages as &$page) {
            $hasUri = isset($page['uri']);
            $hasMvc = isset($page['action']) || isset($page['controller']) || isset($page['route']);
            if ($hasMvc) {
                if (! isset($page['routeMatch']) && $routeMatch) {
                    $page['routeMatch'] = $routeMatch;
                }
                if (! isset($page['router'])) {
                    $page['router'] = $router;
                }
            } elseif ($hasUri) {
                if (! isset($page['request'])) {
                    $page['request'] = $request;
                }
            }

            if (isset($page['pages'])) {
                $page['pages'] = $this->injectComponents($page['pages'], $routeMatch, $router, $request);
            }
        }
        return $pages;
    }

    /**
     * Validate that a route match argument provided to injectComponents is valid.
     *
     * @param null|RouteMatch|MvcRouter\RouteMatch
     * @return void
     * @throws Exception\InvalidArgumentException
     */
    private function validateRouteMatch($routeMatch)
    {
        if (null === $routeMatch) {
            return;
        }

        if (! $routeMatch instanceof RouteMatch
            && ! $routeMatch instanceof MvcRouter\RouteMatch
        ) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s or %s expected by %s::injectComponents; received %s',
                RouteMatch::class,
                MvcRouter\RouteMatch::class,
                __CLASS__,
                (is_object($routeMatch) ? get_class($routeMatch) : gettype($routeMatch))
            ));
        }
    }

    /**
     * Validate that a router argument provided to injectComponents is valid.
     *
     * @param null|Router|MvcRouter\RouteStackInterface
     * @return void
     * @throws Exception\InvalidArgumentException
     */
    private function validateRouter($router)
    {
        if (null === $router) {
            return;
        }

        if (! $router instanceof Router
            && ! $router instanceof MvcRouter\RouteStackInterface
        ) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s or %s expected by %s::injectComponents; received %s',
                RouteMatch::class,
                MvcRouter\RouteMatch::class,
                __CLASS__,
                (is_object($router) ? get_class($router) : gettype($router))
            ));
        }
    }
}


text:
package org.gradle.api.internal.tasks.execution;

import org.gradle.api.internal.TaskOutputCachingState;
import org.gradle.api.internal.tasks.TaskExecutionContext;
import org.gradle.api.internal.tasks.TaskOutputCachingDisabledReasonCategory;
import org.gradle.api.internal.tasks.TaskStateInternal;
import org.gradle.caching.internal.origin.OriginMetadata;
import org.gradle.internal.id.UniqueId;

import javax.annotation.Nullable;
import java.util.List;

public class ExecuteTaskBuildOperationResult implements ExecuteTaskBuildOperationType.Result {

    private final TaskStateInternal taskState;
    private final TaskExecutionContext ctx;

    public ExecuteTaskBuildOperationResult(TaskStateInternal taskState, TaskExecutionContext ctx) {
        this.taskState = taskState;
        this.ctx = ctx;
    }

    @Nullable
    @Override
    public String getSkipMessage() {
        return taskState.getSkipMessage();
    }

    @Override
    public boolean isActionable() {
        return taskState.isActionable();
    }

    @Nullable
    @Override
    public String getOriginBuildInvocationId() {
        OriginMetadata originExecutionMetadata = ctx.getOriginMetadata();
        UniqueId originBuildInvocationId = originExecutionMetadata == null ? null : originExecutionMetadata.getBuildInvocationId();
        return originBuildInvocationId == null ? null : originBuildInvocationId.asString();
    }

    @Nullable
    @Override
    public Long getOriginExecutionTime() {
        OriginMetadata originExecutionMetadata = ctx.getOriginMetadata();
        return originExecutionMetadata == null ? null : originExecutionMetadata.getExecutionTime();
    }

    @Nullable
    @Override
    public String getCachingDisabledReasonMessage() {
        TaskOutputCachingState taskOutputCaching = taskState.getTaskOutputCaching();
        return taskOutputCaching.getDisabledReason();
    }

    @Nullable
    @Override
    public String getCachingDisabledReasonCategory() {
        TaskOutputCachingState taskOutputCaching = taskState.getTaskOutputCaching();
        TaskOutputCachingDisabledReasonCategory disabledReasonCategory = taskOutputCaching.getDisabledReasonCategory();
        return disabledReasonCategory == null ? null : disabledReasonCategory.name();

    }

    @Nullable
    @Override
    public List<String> getUpToDateMessages() {
        return ctx.getUpToDateMessages();
    }

}


text:
> **Tags:**
> - [Breaking Change]
> - [New Feature]
> - [Improvement]
> - [Bug Fix]
> - [Internal]
> - [Documentation]

_Note: Gaps between patch versions are faulty, broken or test releases._

## 3.1.0
* **New Feature**
  * `--global` flag that allows to upgrade global packages ([#70](https://github.com/th0r/npm-upgrade/pull/70), [@Medallyon](https://github.com/Medallyon))

## 3.0.0
 * **Breaking Change**
   * Drop support for Node.js <= 10.19

 * **Internal**
   * Update deps

## 2.0.4
 * **Internal**
   * Use `open` package instead of `opener` ([#52](https://github.com/th0r/npm-upgrade/pull/52), [@cascornelissen](https://github.com/cascornelissen))

## 2.0.3
 * **Internal**
   * Update deps

## 2.0.2
 * **Bug Fix**
   * Fix handling of dependency group flags (`--production`, `--development` etc.)

## 2.0.1
 * **Improvement**
   * Use indentation from `package.json` for `.npm-upgrade.json` ([#36](https://github.com/th0r/npm-upgrade/pull/36), [@cascornelissen](https://github.com/cascornelissen))

## 2.0.0
 * **Breaking Change**
   * Drop support for Node.js <= 8.10

 * **Improvement**
   * Show `@types/*` packages right below their corresponding modules (closes #32)

 * **Internal**
   * Update deps

## 1.4.1
 * **Improvement**
   * Preserve indentation in `package.json` (#21, @cascornelissen)

## 1.4.0
 * **Internal**
   * Update deps

## 1.3.0
 * **New Feature**
   * Show list of packages that will be updated in the end of upgrade process (#18)

 * **Internal**
   * Drop support for Node 4
   * Update deps

## 1.2.0
 * **Internal**
   * Update deps

## 1.1.0
 * **New Feature**
   * Added `changelog` command

 * **Internal**
   * Update deps

## 1.0.4
 * **Bug Fix**
   * Fix Node 8 compatibility issue

 * **Internal**
   * Use `prepare` npm script instead of `prepublish`
   * Update `inquirer`

## 1.0.2
 * **Bug Fix**
   * Fix `ignore reset` command
   * Remove irrelevant `webpack` changelog url from db

 * **Internal**
   * Use `babel-preset-env` instead of `babel-preset-es2015`
   * Update deps

## 1.0.1
 * **New Feature**
   * Ignore modules feature

 * **Internal**
   * Update deps

## 0.7.0
 * **New Feature**
   * Ability to finish upgrade process on every step

 * **Bug Fix**
   * Fix npm loader shown during upgrade process

## 0.6.2
 * **Bug Fix**
   * Fixes #5: Changelogs do not work anymore

## 0.6.1
 * **Improvement**
   * Add `CHANGELOG` to the list of common changelog files

## 0.6.0
 * **New Feature**
   * Added `filter` CLI argument (see [Usage](README.md#usage) section in `README.md`)

 * **Internal**
   * Update deps

## 0.5.1
 * **Bug Fix**
   * Fixed URL to the issues page for the "couldn't find the changelog" message
   * Fixed detection of the repository's "Releases" page on GitHub if it contains dot in the name

## 0.5.0
 * **New Feature**
   * CLI options added to only check for specified groups of dependencies (see [Options](README.md#options) section in `README.md`)

## 0.4.4
 * **Bug Fix**
   * Fixed bug with requesting remote changelog URLs database

## 0.4.3
 * **Breaking Change**
   * Changelog URLs database have been moved from `data/homepages.json` to `db/changelogUrls.json`

 * **Improvement**
   * Utility now tries to find changelog URL for modules hosted on GitHub.
    It will check for some common changelog filenames like `CHANGELOG.md`, `History.md` etc. and
    open them in browser if they are present in the repository.
    If not, it will open project's `releases` page.

 * **New Feature**
   * Added dev CLI utility to easily add module's changelog URL to the database (`tools/addModuleChangelogUrlToDb.js`).
    Run it without arguments for more info.

## 0.3.0
 * **New Feature**
   * Option to open module's homepage or changelog during update process.

## 0.2.0
 * **New Feature**
   * Colorize new/old module versions diff.

 * **Internal**
   * Split code into ES2015 modules.


text:
{% block content %}

{{ total_time }} of standing so far

Standing is a Hubbub experiment · Read the announcement
 Send us an email · Follow @getstanding

{% endblock content %}


text:
var locastyle = locastyle || {};
locastyle.modal = (function() {
  'use strict';

  var config = {
    open: {
      trigger: '[data-ls-module="modal"]',
      triggerOpened: 'modal:opened'
    },
    close: {
      classes: '.ls-modal',
      trigger: '[data-dismiss="modal"]',
      triggerClosed: 'modal:closed'
    },
    classes: {
      open: 'ls-overflow-hidden'
    },
    lsModal : 0
  };

  function init() {
    unbind();
    bindOpen();
  }

  function unbindClose() {
    $(document).off('keyup.ls-esc');
    $(config.close.classes + ", " + config.close.trigger).off('click.ls');
  }

  function unbind() {
    $(config.open.trigger).off('click.ls');
    unbindClose();
  }

  function bindOpen() {
    $(config.open.trigger).on('click.ls', function() {
      locastyle.modal.open($(this));
    });

    if ($('.ls-opened').length > 0) {
      modalBlocked("#" + $('.ls-opened').attr('id'));
    }
  }

  function bindClose() {
    $(document).one('keyup.ls-esc', function (e) {
      if(e.keyCode === 27 && $('.ls-opened')){
        locastyle.modal.close();
      }
    });

    $(config.close.classes + ", " + config.close.trigger).on('click.ls', function(e) {
      if (e.target !== e.currentTarget) {
        return true;
      }
      locastyle.modal.close();
    });
  }

  function open(el) {
    var target = null;

    $('body').addClass(config.classes.open);

    if (!$(el).data('target') && typeof el === 'object') {
      target = $(locastyle.templates.modal(el.data()));
      $('body').append(target);
      $('.ls-modal-template').focus();
      bindClose();
    } else {
      target = $(el).data('target') ? $(el.data('target')) : $(el);
    }

    target.addClass('ls-opened');

    // This event return two arguments: element clicked and target.
    target.trigger(config.open.triggerOpened, el);

    ariaModal(el);
    modalBlocked(el);
  }

  function close() {
    var $this = $('.ls-modal.ls-opened');

    $('body').removeClass(config.classes.open);

    $this.attr('aria-hidden', true);
    $this.removeClass('ls-opened');

    unbindClose();

    // This event return one argument: element target.
    $this.trigger(config.close.triggerClosed);

    if($this.hasClass('ls-modal-template')) {
      $this.remove();
    }
  }

  function modalBlocked(el) {
    var target = $(el).data('target') ? $(el.data('target')) : $(el);
    target.each(function(i,e){
      if ($(e).data('modal-blocked') !== undefined) {
        $(e).find('[data-dismiss="modal"]').remove();
      } else {
        bindClose();
      }
    });
  }

  function ariaModal(el) {
    var modal = $(el).data('target') ? $(el.data('target')) : $(el);
    var idModal = modal.find('.ls-modal-title').attr('id') || 'lsModal' + config.lsModal++;
    modal.find('.ls-modal-title').attr('id', idModal);

    modal.attr({
      role: 'dialog',
      'aria-hidden' : false,
      'aria-labelledby' : idModal,
      tabindex : '-1'
    }).focus();
  }

  return {
    init: init,
    open: open,
    close: close,
    unbind: unbind
  };

}());