text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Cloud.AIPlatform.V1 {

  /// Holder for reflection information generated from google/cloud/aiplatform/v1/specialist_pool.proto
  public static partial class SpecialistPoolReflection {

    #region Descriptor
    /// File descriptor for google/cloud/aiplatform/v1/specialist_pool.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static SpecialistPoolReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "CjBnb29nbGUvY2xvdWQvYWlwbGF0Zm9ybS92MS9zcGVjaWFsaXN0X3Bvb2wu",
            "cHJvdG8SGmdvb2dsZS5jbG91ZC5haXBsYXRmb3JtLnYxGhxnb29nbGUvYXBp",
            "L2Fubm90YXRpb25zLnByb3RvGh9nb29nbGUvYXBpL2ZpZWxkX2JlaGF2aW9y",
            "LnByb3RvGhlnb29nbGUvYXBpL3Jlc291cmNlLnByb3RvIs4CCg5TcGVjaWFs",
            "aXN0UG9vbBIRCgRuYW1lGAEgASgJQgPgQQISGQoMZGlzcGxheV9uYW1lGAIg",
            "ASgJQgPgQQISJgoZc3BlY2lhbGlzdF9tYW5hZ2Vyc19jb3VudBgDIAEoBUID",
            "4EEDEiEKGXNwZWNpYWxpc3RfbWFuYWdlcl9lbWFpbHMYBCADKAkSJwoacGVu",
            "ZGluZ19kYXRhX2xhYmVsaW5nX2pvYnMYBSADKAlCA+BBAxIgChhzcGVjaWFs",
            "aXN0X3dvcmtlcl9lbWFpbHMYByADKAk6eOpBdQooYWlwbGF0Zm9ybS5nb29n",
            "bGVhcGlzLmNvbS9TcGVjaWFsaXN0UG9vbBJJcHJvamVjdHMve3Byb2plY3R9",
            "L2xvY2F0aW9ucy97bG9jYXRpb259L3NwZWNpYWxpc3RQb29scy97c3BlY2lh",
            "bGlzdF9wb29sfULXAQoeY29tLmdvb2dsZS5jbG91ZC5haXBsYXRmb3JtLnYx",
            "QhNTcGVjaWFsaXN0UG9vbFByb3RvUAFaRGdvb2dsZS5nb2xhbmcub3JnL2dl",
            "bnByb3RvL2dvb2dsZWFwaXMvY2xvdWQvYWlwbGF0Zm9ybS92MTthaXBsYXRm",
            "b3JtqgIaR29vZ2xlLkNsb3VkLkFJUGxhdGZvcm0uVjHKAhpHb29nbGVcQ2xv",
            "dWRcQUlQbGF0Zm9ybVxWMeoCHUdvb2dsZTo6Q2xvdWQ6OkFJUGxhdGZvcm06",
            "OlYxYgZwcm90bzM="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.AIPlatform.V1.SpecialistPool), global::Google.Cloud.AIPlatform.V1.SpecialistPool.Parser, new[]{ "Name", "DisplayName", "SpecialistManagersCount", "SpecialistManagerEmails", "PendingDataLabelingJobs", "SpecialistWorkerEmails" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// SpecialistPool represents customers' own workforce to work on their data
  /// labeling jobs. It includes a group of specialist managers and workers.
  /// Managers are responsible for managing the workers in this pool as well as
  /// customers' data labeling jobs associated with this pool. Customers create
  /// specialist pool as well as start data labeling jobs on Cloud, managers and
  /// workers handle the jobs using CrowdCompute console.
  ///
  public sealed partial class SpecialistPool : pb::IMessage<SpecialistPool>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<SpecialistPool> _parser = new pb::MessageParser<SpecialistPool>(() => new SpecialistPool());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<SpecialistPool> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Cloud.AIPlatform.V1.SpecialistPoolReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public SpecialistPool() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public SpecialistPool(SpecialistPool other) : this() {
      name_ = other.name_;
      displayName_ = other.displayName_;
      specialistManagersCount_ = other.specialistManagersCount_;
      specialistManagerEmails_ = other.specialistManagerEmails_.Clone();
      pendingDataLabelingJobs_ = other.pendingDataLabelingJobs_.Clone();
      specialistWorkerEmails_ = other.specialistWorkerEmails_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public SpecialistPool Clone() {
      return new SpecialistPool(this);
    }

    /// Field number for the "name" field.
    public const int NameFieldNumber = 1;
    private string name_ = "";
    ///
    /// Required. The resource name of the SpecialistPool.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "display_name" field.
    public const int DisplayNameFieldNumber = 2;
    private string displayName_ = "";
    ///
    /// Required. The user-defined name of the SpecialistPool.
    /// The name can be up to 128 characters long and can be consist of any UTF-8
    /// characters.
    /// This field should be unique on project-level.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string DisplayName {
      get { return displayName_; }
      set {
        displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "specialist_managers_count" field.
    public const int SpecialistManagersCountFieldNumber = 3;
    private int specialistManagersCount_;
    ///
    /// Output only. The number of managers in this SpecialistPool.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int SpecialistManagersCount {
      get { return specialistManagersCount_; }
      set {
        specialistManagersCount_ = value;
      }
    }

    /// Field number for the "specialist_manager_emails" field.
    public const int SpecialistManagerEmailsFieldNumber = 4;
    private static readonly pb::FieldCodec<string> _repeated_specialistManagerEmails_codec
        = pb::FieldCodec.ForString(34);
    private readonly pbc::RepeatedField<string> specialistManagerEmails_ = new pbc::RepeatedField<string>();
    ///
    /// The email addresses of the managers in the SpecialistPool.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<string> SpecialistManagerEmails {
      get { return specialistManagerEmails_; }
    }

    /// Field number for the "pending_data_labeling_jobs" field.
    public const int PendingDataLabelingJobsFieldNumber = 5;
    private static readonly pb::FieldCodec<string> _repeated_pendingDataLabelingJobs_codec
        = pb::FieldCodec.ForString(42);
    private readonly pbc::RepeatedField<string> pendingDataLabelingJobs_ = new pbc::RepeatedField<string>();
    ///
    /// Output only. The resource name of the pending data labeling jobs.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<string> PendingDataLabelingJobs {
      get { return pendingDataLabelingJobs_; }
    }

    /// Field number for the "specialist_worker_emails" field.
    public const int SpecialistWorkerEmailsFieldNumber = 7;
    private static readonly pb::FieldCodec<string> _repeated_specialistWorkerEmails_codec
        = pb::FieldCodec.ForString(58);
    private readonly pbc::RepeatedField<string> specialistWorkerEmails_ = new pbc::RepeatedField<string>();
    ///
    /// The email addresses of workers in the SpecialistPool.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<string> SpecialistWorkerEmails {
      get { return specialistWorkerEmails_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as SpecialistPool);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(SpecialistPool other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Name != other.Name) return false;
      if (DisplayName != other.DisplayName) return false;
      if (SpecialistManagersCount != other.SpecialistManagersCount) return false;
      if(!specialistManagerEmails_.Equals(other.specialistManagerEmails_)) return false;
      if(!pendingDataLabelingJobs_.Equals(other.pendingDataLabelingJobs_)) return false;
      if(!specialistWorkerEmails_.Equals(other.specialistWorkerEmails_)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode();
      if (SpecialistManagersCount != 0) hash ^= SpecialistManagersCount.GetHashCode();
      hash ^= specialistManagerEmails_.GetHashCode();
      hash ^= pendingDataLabelingJobs_.GetHashCode();
      hash ^= specialistWorkerEmails_.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Name.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Name);
      }
      if (DisplayName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(DisplayName);
      }
      if (SpecialistManagersCount != 0) {
        output.WriteRawTag(24);
        output.WriteInt32(SpecialistManagersCount);
      }
      specialistManagerEmails_.WriteTo(output, _repeated_specialistManagerEmails_codec);
      pendingDataLabelingJobs_.WriteTo(output, _repeated_pendingDataLabelingJobs_codec);
      specialistWorkerEmails_.WriteTo(output, _repeated_specialistWorkerEmails_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Name.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Name);
      }
      if (DisplayName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(DisplayName);
      }
      if (SpecialistManagersCount != 0) {
        output.WriteRawTag(24);
        output.WriteInt32(SpecialistManagersCount);
      }
      specialistManagerEmails_.WriteTo(ref output, _repeated_specialistManagerEmails_codec);
      pendingDataLabelingJobs_.WriteTo(ref output, _repeated_pendingDataLabelingJobs_codec);
      specialistWorkerEmails_.WriteTo(ref output, _repeated_specialistWorkerEmails_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (DisplayName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName);
      }
      if (SpecialistManagersCount != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(SpecialistManagersCount);
      }
      size += specialistManagerEmails_.CalculateSize(_repeated_specialistManagerEmails_codec);
      size += pendingDataLabelingJobs_.CalculateSize(_repeated_pendingDataLabelingJobs_codec);
      size += specialistWorkerEmails_.CalculateSize(_repeated_specialistWorkerEmails_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(SpecialistPool other) {
      if (other == null) {
        return;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.DisplayName.Length != 0) {
        DisplayName = other.DisplayName;
      }
      if (other.SpecialistManagersCount != 0) {
        SpecialistManagersCount = other.SpecialistManagersCount;
      }
      specialistManagerEmails_.Add(other.specialistManagerEmails_);
      pendingDataLabelingJobs_.Add(other.pendingDataLabelingJobs_);
      specialistWorkerEmails_.Add(other.specialistWorkerEmails_);
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Name = input.ReadString();
            break;
          }
          case 18: {
            DisplayName = input.ReadString();
            break;
          }
          case 24: {
            SpecialistManagersCount = input.ReadInt32();
            break;
          }
          case 34: {
            specialistManagerEmails_.AddEntriesFrom(input, _repeated_specialistManagerEmails_codec);
            break;
          }
          case 42: {
            pendingDataLabelingJobs_.AddEntriesFrom(input, _repeated_pendingDataLabelingJobs_codec);
            break;
          }
          case 58: {
            specialistWorkerEmails_.AddEntriesFrom(input, _repeated_specialistWorkerEmails_codec);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Name = input.ReadString();
            break;
          }
          case 18: {
            DisplayName = input.ReadString();
            break;
          }
          case 24: {
            SpecialistManagersCount = input.ReadInt32();
            break;
          }
          case 34: {
            specialistManagerEmails_.AddEntriesFrom(ref input, _repeated_specialistManagerEmails_codec);
            break;
          }
          case 42: {
            pendingDataLabelingJobs_.AddEntriesFrom(ref input, _repeated_pendingDataLabelingJobs_codec);
            break;
          }
          case 58: {
            specialistWorkerEmails_.AddEntriesFrom(ref input, _repeated_specialistWorkerEmails_codec);
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code


text:
package org.thymeleaf.benchmarks.benchmark02.model;

public class Comment {

    private Integer id = null;
    private String text = null;

    public Comment() {
        super();
    }

    public Comment(final Integer id, final String text) {
        this.id = id;
        this.text = text;
    }

    public Integer getId() {
        return this.id;
    }
    public void setId(final Integer id) {
        this.id = id;
    }

    public String getText() {
        return this.text;
    }
    public void setText(final String text) {
        this.text = text;
    }

}

redpajama_set_name: RedPajamaGithub


text:
The CI can be configured to ignore specific files and directories in the build process using the `Files` and `Extensions` directives.

The following files and diretories will always be ignored:

- project.conf
- .git
- .gitignore
- .gitmodules
- .gitattributes

Example usage:

    {
        "Files": {
            "README.md": true,
            "docs": true
        },
        "Extensions": {
            ".txt": true
        }
    }

    placed in a project.conf with the structure

    |- project.conf
    |- _.mod.lua
    |- README.md
    |- UnimportantScript.mod.lua
    |- LICENSE.txt
    |- docs
     \
     |- UnimportantExample.lua
     |- UnimportantFile.pdf

    will be built to

    |- MainModule (ModuleScript)
     \
     |- UnimportantScript (ModuleScript)


text:
$(document).ready(function() {
    $("#algorithms").change(function() {
        var alg = Number($('#algorithms').val());
        var data = {data: JSON.stringify({"algid":alg})};
        if (alg == 0) {
            $('#alg_info').hide();
            $('#imp_info').hide();
            $('.alg_val').empty();
            $('.imp_val').empty();
            $('#implementations').html('<option value="0">Select Implementation</option>');
        } else {
            $('#imp_info').hide();
            $('.imp_val').empty();
            $('#alg_info').show();
            $.post("narrow", data, function(response) {
            $('#implementations').html(response.imps);
            $('#alg_name').html(response.name);
            $('#alg_descr').html(response.descr);
            $('#alg_tags').html(response.tags);

            });
        }

    });
});

$(document).ready(function() {
    $("#implementations").change(function() {
        var imp = Number($('#implementations').val());
        var data = {data: JSON.stringify({"impid":imp})};
        if (imp == 0) {
            $('#imp_info').hide();
            $('.imp_val').empty();
        } else {
            $('#imp_info').show();
           $.post("select_imp", data, function(response) {
            $('#imp_name').html(response.name);
            $('#imp_alg').html(response.alg);
            $('#imp_urls').html(response.urls);
            $('#imp_scripts').html(response.scripts);
            $('#imp_exe').html(response.exe);
            $('#imp_descr').html(response.descr);
            $('#imp_tags').html(response.tags);

            });
        }

    });
});

$(document).ready(function() {
    $("#alg_button").click(function() {
        if ($("#alg_button").html() == "Add New Algorithm") {
            $("#alg_button").html("Hide Algorithm Form");
            $("#alg_form").show();
        } else {
            $("#alg_button").html("Add New Algorithm");
            $("#alg_form").hide();
        }

    });
});

$(document).ready(function() {
    $("#imp_button").click(function() {
        if ($("#imp_button").html() == "Add New Implementation") {
            $("#imp_button").html("Hide Implementation Form");
            $("#imp_form").show();
        } else {
            $("#imp_button").html("Add New Implementation");
            $("#imp_form").hide();
        }

    });
});


text:
package com.youama.nexus.parser.collector;

import com.youama.nexus.core.item.BasicItem;
import org.junit.*;
import static org.junit.Assert.*;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

/**
 * @author David Belicza
 * @since 0.1.0
 */
public class LinkCollectorTest {

    public String stringHTMLSource = "";

    @Before
    public void setUp() {
        try {
            String path = this.getClass().getResource("/simple1.html").getPath();
            byte[] encoded = Files.readAllBytes(Paths.get(path));
            stringHTMLSource = new String(encoded, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            stringHTMLSource = "";
            e.printStackTrace();
        } catch (IOException e) {
            stringHTMLSource = "";
            e.printStackTrace();
        }
    }

    @Test
    public void testValidateLinks() {
        List<BasicItem> items;
        LinkCollector linkCollector = new LinkCollector(stringHTMLSource);
        linkCollector.parse();

        linkCollector.validateLinks(false);
        items = linkCollector.getItems();
        assertEquals(5, items.get(0).getData().size());

        linkCollector.validateLinks(true);
        items = linkCollector.getItems();
        assertEquals(4, items.get(0).getData().size());
    }

    @Test
    public void testParse() {
        LinkCollector linkCollector = new LinkCollector(stringHTMLSource);
        linkCollector.parse();
        List<BasicItem> items = linkCollector.getItems();
        assertEquals(8, items.get(0).getData().size());
    }

    @Test
    public void testParseByRule() {

        LinkCollector linkCollector = new LinkCollector(stringHTMLSource);
        List<BasicItem> items;

        // All no-follow links
        linkCollector.parseByRule(CollectorSelector.LINK_NO_FOLLOW);
        items = linkCollector.getItems();
        assertEquals(1, items.get(0).getData().size());

        // All kind of links
        linkCollector.parseByRule(CollectorSelector.LINK_ALL);
        items = linkCollector.getItems();
        assertEquals(8, items.get(0).getData().size());

        // Only valid links
        linkCollector.parseByRule(CollectorSelector.LINK_VALID);
        items = linkCollector.getItems();
        assertEquals(5, items.get(0).getData().size());

        // Only valid and non-resource links
        linkCollector.parseByRule(CollectorSelector.LINK_VALID_NO_RESOURCES);
        items = linkCollector.getItems();
        assertEquals(4, items.get(0).getData().size());
    }
}


text:
import dateutil.parser

from django.conf import settings

UUID_REGEX = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'

vend_settings = {
    'VEND_DEFAULT_USER_IMAGE': ('https://secure.vendhq.com/images/placeholder'
                                '/customer/no-image-white-standard.png'),
}

def get_vend_setting(name):
    return getattr(settings, name, None) or vend_settings.get(name)

def parse_date(possible_date):
    if not possible_date or possible_date == "null":
        return None
    else:
        return dateutil.parser.parse(possible_date)


text:
import sys, socket, select, time
from optparse import OptionParser

XBOX_PORT = 5050
XBOX_PING = "dd00000a000000000000000400000002"
XBOX_POWER = "dd02001300000010"

help_text = "xbox-remote-power.py -a <ip address> -i <live id>"

py3 = sys.version_info[0] > 2

def main():
    parser = OptionParser()
    parser.add_option('-a', '--address', dest='ip_addr', help="IP Address of Xbox One", default='')
    parser.add_option('-i', '--id', dest='live_id', help="Live ID of Xbox One", default='')
    (opts, args) = parser.parse_args()

    if not opts.ip_addr:
        opts.ip_addr = user_input("Enter the IP address: ")

    ping = False
    if not opts.live_id:
        print("No Live ID given, do you want to attempt to ping the Xbox for it?")
        result = ""
        while result not in ("y", "n"):
            result = user_input("(y/n): ").lower()
        if result == "y":
            ping = True
        elif result == "n":
            opts.live_id = user_input("Enter the Live ID: ")

    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    s.setblocking(0)
    s.bind(("", 0))
    s.connect((opts.ip_addr, XBOX_PORT))

    if ping:
        print("Attempting to ping Xbox for Live ID...")
        if py3:
            s.send(bytes.fromhex(XBOX_PING))
        else:
            s.send(XBOX_PING.decode("hex"))

        ready = select.select([s], [], [], 5)
        if ready[0]:
            data = s.recv(1024)
            opts.live_id = data[199:215]
        else:
            print("Failed to ping Xbox, please enter Live ID manually")
            opts.live_id = user_input("Enter the Live ID: ")

    if isinstance(opts.live_id, str):
        live_id = opts.live_id.encode()

    if py3:
        power_packet = bytes.fromhex(XBOX_POWER)
        power_packet = power_packet + opts.live_id + b'\x00'
    else:
        power_packet = XBOX_POWER + opts.live_id.encode("hex") + "00"
        power_packet = power_packet.decode("hex")

    print("Sending power on packets to " + opts.ip_addr)
    for i in range(0, 5):
        s.send(power_packet)
        time.sleep(1)
    print("Xbox should turn on now")

    s.close()

def user_input(text):
    response = ""

    while response == "":
        if py3:
            response = input(text)
        else:
            response = raw_input(text)

    return response

if __name__ == "__main__":
    main()


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:weightSum="1">

    <NumberPicker
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/budgetPicker"
        android:layout_weight="0.12"
        android:gravity="fill_horizontal"
        android:theme="@android:style/Theme.Holo"
        />

    <Button
        android:layout_width="150dp"
        android:layout_height="50dp"
        android:text="Done"
        android:id="@+id/doneButton"
        android:onClick="onClick"
        android:layout_gravity="center_horizontal"
        style="@style/Buttons"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp" />
</LinearLayout>


text:
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.toparchy</groupId>
	<artifactId>platform</artifactId>
	<version>0.0.2-SNAPSHOT</version>
	<packaging>war</packaging>
	<name>platform</name>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<distribution>repo</distribution>
			<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
		</license>
	</licenses>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin>
		<version.jboss.bom>8.1.0.Final</version.jboss.bom>
		<version.arquillian.container>8.1.0.Final</version.arquillian.container>
		<version.compiler.plugin>3.1</version.compiler.plugin>
		<version.surefire.plugin>2.16</version.surefire.plugin>
		<version.war.plugin>2.1.1</version.war.plugin>
		<maven.compiler.target>1.7</maven.compiler.target>
		<maven.compiler.source>1.7</maven.compiler.source>
		<deltaspike.version>1.0.2</deltaspike.version>
		<jbpm.version>6.0.1.Final</jbpm.version>
		<drools.version>6.0.1.Final</drools.version>
		<optaplanner.version>6.0.1.Final</optaplanner.version>
	</properties>

	<dependencyManagement>
		<dependencies>

			<!-- Dependency Management for Java EE 7.0 -->
			<dependency>
				<groupId>org.wildfly.bom</groupId>
				<artifactId>jboss-javaee-7.0-with-all</artifactId>
				<version>${version.jboss.bom}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!-- Dependency Management for PicketLink and Java EE 6.0. -->
			<dependency>
				<groupId>org.picketlink</groupId>
				<artifactId>picketlink-javaee-6.0</artifactId>
				<version>2.6.1.Final</version>
				<scope>import</scope>
				<type>pom</type>
			</dependency>

			<!-- define drools BOM -->

			<!-- define drools BOM -->

			<!-- define optaplanner BOM -->
		</dependencies>

	</dependencyManagement>

	<dependencies>
<!-- Import the CDI API, we use provided scope as the API is included in
			JBoss WildFly -->
		<dependency>
			<groupId>javax.enterprise</groupId>
			<artifactId>cdi-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Import the Common Annotations API (JSR-250), we use provided scope
			as the API is included in JBoss WildFly -->
		<dependency>
			<groupId>org.jboss.spec.javax.annotation</groupId>
			<artifactId>jboss-annotations-api_1.2_spec</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Import the JAX-RS API, we use provided scope as the API is included
			in JBoss WildFly -->
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>jaxrs-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-client</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-netty</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-jaxrs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-jackson2-provider</artifactId>
			<scope>provided</scope>
		</dependency>
		<!-- Import the JPA API, we use provided scope as the API is included in
			JBoss WildFly -->
		<dependency>
			<groupId>org.hibernate.javax.persistence</groupId>
			<artifactId>hibernate-jpa-2.1-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<scope>provided</scope>
		</dependency>
		<!-- Import the EJB API, we use provided scope as the API is included in
			JBoss WildFly -->
		<dependency>
			<groupId>org.jboss.spec.javax.ejb</groupId>
			<artifactId>jboss-ejb-api_3.2_spec</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- JSR-303 (Bean Validation) Implementation -->
		<!-- Provides portable constraints such as @Email -->
		<!-- Hibernate Validator is shipped in JBoss WildFly -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Import the JSF API, we use provided scope as the API is included in
			JBoss WildFly -->
		<dependency>
			<groupId>org.jboss.spec.javax.faces</groupId>
			<artifactId>jboss-jsf-api_2.2_spec</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.spec.javax.servlet</groupId>
			<artifactId>jboss-servlet-api_3.1_spec</artifactId>
		</dependency>
		<dependency>
  <groupId>org.jboss.spec.javax.interceptor</groupId>
  <artifactId>jboss-interceptors-api_1.2_spec</artifactId>
</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-jpamodelgen</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Annotation processor that raising compilation errors whenever constraint
			annotations are incorrectly used. -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator-annotation-processor</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Needed for running tests (you may also use TestNG) -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Optional, but highly recommended -->
		<!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA)
			JPA from JUnit/TestNG -->
		<dependency>
			<groupId>org.jboss.arquillian.junit</groupId>
			<artifactId>arquillian-junit-container</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.jboss.arquillian.protocol</groupId>
			<artifactId>arquillian-protocol-servlet</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- primefaces -->
		<dependency>
			<groupId>org.primefaces</groupId>
			<artifactId>primefaces</artifactId>
			<version>5.1</version>
		</dependency>
		<dependency>
			<groupId>org.primefaces.extensions</groupId>
			<artifactId>primefaces-extensions</artifactId>
			<version>3.0.0</version>
		</dependency>
		<dependency>
			<groupId>org.primefaces.extensions</groupId>
			<artifactId>resources-ckeditor</artifactId>
			<version>2.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.primefaces.extensions</groupId>
			<artifactId>resources-codemirror</artifactId>
			<version>2.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.primefaces.extensions</groupId>
			<artifactId>all-themes</artifactId>
			<version>1.0.8</version>
		</dependency>
		<dependency>
			<groupId>net.sourceforge.jtds</groupId>
			<artifactId>jtds</artifactId>
			<version>1.3.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-all</artifactId>
			<version>4.0.23.Final</version>
		</dependency>
		<dependency>
			<groupId>com.jcraft</groupId>
			<artifactId>jzlib</artifactId>
			<version>1.1.3</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi</artifactId>
			<version>3.10.1</version>
		</dependency>
		<dependency>
			<groupId>com.lowagie</groupId>
			<artifactId>itext</artifactId>
			<version>4.2.1</version>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.3</version>
		</dependency>
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
			<version>20140107</version>
		</dependency>

		<!-- PicketLink dependencies -->
		<dependency>
			<groupId>org.picketlink</groupId>
			<artifactId>picketlink</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.picketlink</groupId>
			<artifactId>picketlink-idm-simple-schema</artifactId>
			<scope>compile</scope>
		</dependency>
	</dependencies>

	<build>
		<finalName>${project.artifactId}</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${version.compiler.plugin}</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>${version.war.plugin}</version>
				<configuration>
					<failOnMissingWebXml>false</failOnMissingWebXml>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.wildfly.plugins</groupId>
				<artifactId>wildfly-maven-plugin</artifactId>
				<version>${version.wildfly.maven.plugin}</version>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>${version.surefire.plugin}</version>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>arq-wildfly-managed</id>
			<dependencies>
				<dependency>
					<groupId>org.wildfly</groupId>
					<artifactId>wildfly-arquillian-container-managed</artifactId>
					<version>${version.arquillian.container}</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>arq-wildfly-remote</id>
			<dependencies>
				<dependency>
					<groupId>org.wildfly</groupId>
					<artifactId>wildfly-arquillian-container-remote</artifactId>
					<version>${version.arquillian.container}</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>openshift</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-war-plugin</artifactId>
						<version>${version.war.plugin}</version>
						<configuration>
							<outputDirectory>deployments</outputDirectory>
							<warName>ROOT</warName>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>


text:
#include "wt_internal.h"

/*
 * __wt_bytelock --
 *	Lock/unlock a byte in a file.
 */
int
__wt_bytelock(WT_FH *fhp, wt_off_t byte, int lock)
{
	struct flock fl;
	WT_DECL_RET;

	/*
	 * WiredTiger requires this function be able to acquire locks past
	 * the end of file.
	 *
	 * Note we're using fcntl(2) locking: all fcntl locks associated with a
	 * file for a given process are removed when any file descriptor for the
	 * file is closed by the process, even if a lock was never requested for
	 * that file descriptor.
	 */
	fl.l_start = byte;
	fl.l_len = 1;
	fl.l_type = lock ? F_WRLCK : F_UNLCK;
	fl.l_whence = SEEK_SET;

	WT_SYSCALL_RETRY(fcntl(fhp->fd, F_SETLK, &fl), ret);

	return (ret);
}