text:
package fixtures

import common.enums.VatRegStatus
import models._
import models.api._
import models.api.vatapplication._
import models.external.{BvPass, PartnershipIdEntity}
import play.api.http.Status._
import play.api.libs.json.{JsObject, Json}
import uk.gov.hmrc.http._
import uk.gov.hmrc.http.cache.client.CacheMap

import java.time.LocalDate

trait BaseFixture {
  //Test variables
  val testDate = LocalDate.of(2017, 3, 21)
  val testTradingName = "ACME INC"
  val testSortCode = "12-34-56"
  val testAccountNumber = "12345678"
  val validLabourSicCode: SicCode = SicCode("81221001", "BarFoo", "BarFoo")
  val validNoCompliance: SicCode = SicCode("12345678", "fooBar", "FooBar")
  val validExpectedOverTrue = Some(testDate)

  def generateThreshold(mandatory: Boolean = false,
                        thresholdPreviousThirtyDays: Option[LocalDate] = None,
                        thresholdInTwelveMonths: Option[LocalDate] = None) =
    (mandatory, thresholdPreviousThirtyDays, thresholdInTwelveMonths) match {
      case (false, None, None) => Threshold(false)
      case (_, ptd, itm) if List(ptd, itm).flatten.nonEmpty => Threshold(true, ptd, itm)
      case _ => Threshold(false)
    }

  val validVoluntaryRegistration = generateThreshold()
  val validMandatoryRegistrationThirtyDays = generateThreshold(thresholdPreviousThirtyDays = Some(testDate))
  val validMandatoryRegistrationBothDates = generateThreshold(thresholdPreviousThirtyDays = Some(testDate), thresholdInTwelveMonths = Some(testDate))
  val validMandatoryRegistrationTwelve = generateThreshold(thresholdInTwelveMonths = Some(testDate))
  val optVoluntaryRegistration = Some(validVoluntaryRegistration)
  val optMandatoryRegistrationThirtyDays = Some(validMandatoryRegistrationThirtyDays)
  val optMandatoryRegistrationBothDates = Some(validMandatoryRegistrationBothDates)
  val optMandatoryRegistrationTwelve = Some(validMandatoryRegistrationTwelve)
}

trait VatRegistrationFixture extends BaseFixture with FlatRateFixtures with ApplicantDetailsFixtures {

  val ukBankAccount = BankAccount(isProvided = true, Some(BankAccountDetails("accountName", "SortCode", "AccountNumber")), None)

  val sicCode = SicCode("88888", "description", "displayDetails")

  val currentThreshold = "50000"
  val formattedThreshold = "50,000"

  //Responses
  val forbidden = UpstreamErrorResponse(FORBIDDEN.toString, FORBIDDEN, FORBIDDEN)
  val noContent = HttpResponse(204, "")
  val upstream4xx = UpstreamErrorResponse(IM_A_TEAPOT.toString, IM_A_TEAPOT, IM_A_TEAPOT)
  val upstream5xx = UpstreamErrorResponse(INTERNAL_SERVER_ERROR.toString, INTERNAL_SERVER_ERROR, INTERNAL_SERVER_ERROR)
  val validHttpResponse = HttpResponse(OK, "{}")

  // CacheMap from S4l
  val validCacheMap = CacheMap("fooBarWizzBand", Map("foo" -> Json.toJson("wizz")))

  //Exceptions
  val badRequest = new BadRequestException(BAD_REQUEST.toString)
  val notFound = new NotFoundException(NOT_FOUND.toString)
  val internalServiceException = new InternalServerException(BAD_GATEWAY.toString)
  val runTimeException = new RuntimeException("tst")
  val internalServerError = UpstreamErrorResponse(INTERNAL_SERVER_ERROR.toString, INTERNAL_SERVER_ERROR, INTERNAL_SERVER_ERROR)
  val exception = new Exception(BAD_GATEWAY.toString)

  //Test variables
  val contextRoot = "/register-for-vat"
  val testNino: String = "AA 12 34 56 C"
  val testBusinessActivityDescription = "description"
  val testRegId = "VAT123456"
  val testHonestyDeclaration = true
  val validBankCheckJsonResponseString =
    s"""
       |{
       |  "accountNumberIsWellFormatted": "yes",
       |  "nonStandardAccountDetailsRequiredForBacs": "no"
       |}
     """.stripMargin

  val validBankCheckJsonResponse = Json.parse(validBankCheckJsonResponseString)

  val invalidBankCheckJsonResponseString =
    s"""
       |{
       |  "accountNumberIsWellFormatted": "no",
       |  "nonStandardAccountDetailsRequiredForBacs": "no"
       |}
     """.stripMargin

  val invalidBankCheckJsonResponse = Json.parse(invalidBankCheckJsonResponseString)

  val indeterminateBankCheckJsonResponseString =
    s"""
       |{
       |  "accountNumberIsWellFormatted": "indeterminate",
       |  "nonStandardAccountDetailsRequiredForBacs": "no"
       |}
     """.stripMargin

  val indeterminateBankCheckJsonResponse = Json.parse(indeterminateBankCheckJsonResponseString)

  val complianceWithoutLabour = LabourCompliance(None, None, None)
  val complianceWithLabour = LabourCompliance(Some(12), Some(true), Some(true))

  lazy val validTransactorDetails: TransactorDetails = TransactorDetails(
    personalDetails = Some(PersonalDetails(
      firstName = "testFirstName",
      lastName = "testLastName",
      nino = Some("AB123456C"),
      trn = None,
      identifiersMatch = true,
      dateOfBirth = Some(LocalDate.of(2020, 1, 1))
    )),
    isPartOfOrganisation = Some(true),
    organisationName = Some("testCompanyName"),
    telephone = Some("1234"),
    email = Some("test@t.test"),
    emailVerified = Some(true),
    address = Some(testAddress),
    declarationCapacity = Some(DeclarationCapacityAnswer(AuthorisedEmployee))
  )

  //Api models

  val testLine1 = "line1"
  val testLine2 = "line2"
  val testLine3 = "line3"
  val testLine4 = "line4"
  val testLine5 = "line5"
  val testCountry = Country(Some("UK"), Some("United Kingdom"))
  val testAddress = Address(testLine1, Some(testLine2), None, None, None, Some(testPostcode), Some(testCountry), addressValidated = true)

  val validCompRegProfileJson: JsObject = Json.parse(
    """
      |{
      |  "status":"submitted",
      |  "acknowledgementReferences":{
      |    "status":"04"
      |  }
      |}
    """.stripMargin).as[JsObject]

  val emptyVatScheme = VatScheme(testRegId, testDate, status = VatRegStatus.draft)

  val validPartnershipIdEntity = PartnershipIdEntity(
    sautr = Some(testSautr),
    companyName = Some(testCompanyName),
    postCode = Some(testPostcode),
    registration = testRegistration,
    businessVerification = Some(BvPass),
    identifiersMatch = true
  )

  val validEntities = List[Entity](
    Entity(
      details = Some(validPartnershipIdEntity),
      partyType = LtdLiabilityPartnership,
      isLeadPartner = Some(true),
      optScottishPartnershipName = None,
      address = Some(testAddress),
      email = Some("test@foo.com"),
      telephoneNumber = Some("1234567890")
    ),
    Entity(
      details = Some(validPartnershipIdEntity),
      partyType = LtdLiabilityPartnership,
      isLeadPartner = Some(false),
      optScottishPartnershipName = None,
      address = Some(testAddress),
      email = Some("test@foo.com"),
      telephoneNumber = Some("1234567890")
    )
  )

  val validNipCompliance = NIPTurnover(
    goodsToEU = Some(ConditionalValue(true, Some(BigDecimal(1)))),
    goodsFromEU = Some(ConditionalValue(true, Some(BigDecimal(1))))
  )

  val testTurnover = 100
  val testZeroRatedSupplies = 10000.5
  val validVatApplication: VatApplication = VatApplication(
    tradeVatGoodsOutsideUk = Some(false),
    eoriRequested = Some(false),
    turnoverEstimate = Some(testTurnover),
    zeroRatedSupplies = Some(testZeroRatedSupplies),
    claimVatRefunds = Some(false),
    appliedForExemption = None,
    startDate = Some(LocalDate.of(2017, 10, 10)),
    returnsFrequency = Some(Monthly),
    staggerStart = Some(MonthlyStagger)
  )

  val validAasDetails = AASDetails(Some(QuarterlyPayment), Some(BACS))

  val validUkBankAccount = BankAccount(isProvided = true, Some(BankAccountDetails("testName", "12-34-56", "12345678")), None)

  val noUkBankAccount = BankAccount(isProvided = false, None, Some(BeingSetupOrNameChange))

  val validEligibilitySubmissionData: EligibilitySubmissionData = EligibilitySubmissionData(
    validMandatoryRegistrationThirtyDays,
    UkCompany,
    isTransactor = false,
    appliedForException = None,
    registrationReason = ForwardLook
  )

  val validSoleTraderEligibilitySubmissionData: EligibilitySubmissionData = EligibilitySubmissionData(
    validMandatoryRegistrationThirtyDays,
    Individual,
    isTransactor = false,
    appliedForException = None,
    registrationReason = ForwardLook
  )

  val validBusiness = Business(
    hasTradingName = Some(true),
    tradingName = Some(testTradingName),
    email = Some("test@foo.com"),
    telephoneNumber = Some("123"),
    hasWebsite = Some(true),
    website = Some("/test/url"),
    ppobAddress = Some(testAddress),
    contactPreference = Some(Email),
    labourCompliance = Some(complianceWithoutLabour),
    businessDescription = Some(testBusinessActivityDescription),
    mainBusinessActivity = Some(sicCode)
  )

  val validBusinessWithNoDescription = Business(
    hasTradingName = Some(true),
    tradingName = Some(testTradingName),
    email = Some("test@foo.com"),
    telephoneNumber = Some("123"),
    hasWebsite = Some(true),
    website = Some("/test/url"),
    ppobAddress = Some(testAddress),
    contactPreference = Some(Email),
    labourCompliance = Some(complianceWithoutLabour)
  )

  val validBusinessWithNoDescriptionAndLabour = Business(
    hasTradingName = Some(true),
    tradingName = Some(testTradingName),
    email = Some("test@foo.com"),
    telephoneNumber = Some("123"),
    hasWebsite = Some(true),
    website = Some("/test/url"),
    ppobAddress = Some(testAddress),
    contactPreference = Some(Email),
    mainBusinessActivity = Some(sicCode),
    businessActivities = Some(List(sicCode))
  )

  val otherBusinessInvolvementWithVrn = OtherBusinessInvolvement(
    businessName = Some("test business name"),
    hasVrn = Some(true),
    vrn = Some("123456782"),
    hasUtr = None,
    utr = None,
    stillTrading = Some(false))
  val otherBusinessInvolvementWithUtr = OtherBusinessInvolvement(
    businessName = Some("test business name"),
    hasVrn = None,
    vrn = None,
    hasUtr = Some(true),
    utr = Some("123456782"),
    stillTrading = Some(false))
  val otherBusinessInvolvementWithoutVrnUtr = OtherBusinessInvolvement(
    businessName = Some("test business name"),
    hasVrn = Some(false),
    vrn = None,
    hasUtr = Some(false),
    utr = None,
    stillTrading = Some(false))
  val otherBusinessInvolvementWithPartialData = OtherBusinessInvolvement(
    businessName = Some("test business name"),
    hasVrn = None,
    vrn = None,
    hasUtr = None,
    utr = None,
    stillTrading = None)

  val validVatScheme = VatScheme(
    registrationId = testRegId,
    createdDate = testDate,
    business = Some(validBusiness),
    applicantDetails = Some(completeApplicantDetails),
    flatRateScheme = Some(validFlatRate),
    bankAccount = Some(validUkBankAccount),
    vatApplication = Some(validVatApplication),
    status = VatRegStatus.draft,
    eligibilitySubmissionData = Some(validEligibilitySubmissionData)
  )

  val validSoleTraderVatScheme = VatScheme(
    registrationId = testRegId,
    createdDate = testDate,
    business = Some(validBusiness),
    applicantDetails = Some(completeApplicantDetails),
    flatRateScheme = Some(validFlatRate),
    bankAccount = Some(validUkBankAccount),
    vatApplication = Some(validVatApplication),
    status = VatRegStatus.draft,
    eligibilitySubmissionData = Some(validSoleTraderEligibilitySubmissionData)
  )

  // ICL
  val iclMultipleResults = Json.parse(
    """
      | {
      |   "sicCodes": [
      |     {
      |       "code" : "12345",
      |       "desc" : "Whale farming",
      |       "indexes" : [
      |         {
      |         "desc" : "Fish farming",
      |         "desc" : "Fish-related activities"
      |         } ]
      |        },
      |     {
      |       "code" : "23456",
      |       "desc" : "Dog walking",
      |       "indexes" : [
      |         {
      |         "desc" : "Animal services"
      |         } ]
      |        }
      |   ]
      | }
    """.stripMargin).as[JsObject]

  val iclMultipleResultsSicCode1 = SicCode("12345", "Whale farming", "")
  val iclMultipleResultsSicCode2 = SicCode("23456", "Dog walking", "")

  val iclSingleResult = Json.parse(
    """
      | {
      |   "sicCodes": [
      |     {
      |       "code" : "12345",
      |       "desc" : "Whale farming",
      |       "indexes" : [
      |         {
      |         "desc" : "Fish farming",
      |         "desc" : "Fish-related activities"
      |         } ]
      |        }
      |       ]
      |     }
    """.stripMargin).as[JsObject]

  val fullEligibilityDataJson = Json.parse(
    """
      |{ "sections": [
      |            {
      |              "title": "section_1",
      |              "data": [
      |                {"questionId": "mandatoryRegistration", "question": "Question 1", "answer": "FOO", "answerValue": true},
      |                {"questionId": "voluntaryRegistration", "question": "Question 2", "answer": "BAR", "answerValue": false},
      |                {"questionId": "thresholdPreviousThirtyDays", "question": "Question 3", "answer": "wizz", "answerValue": "2017-05-23"},
      |                {"questionId": "thresholdInTwelveMonths", "question": "Question 4", "answer": "woosh", "answerValue": "2017-07-16"}
      |              ]
      |            },
      |            {
      |              "title": "section_2",
      |              "data": [
      |                {"questionId": "applicantUKNino", "question": "Question 5", "answer": "bang", "answerValue": "SR123456C"},
      |                {"questionId": "turnoverEstimate", "question": "Question 6", "answer": "BUZZ", "answerValue": 2024},
      |                {"questionId": "completionCapacity", "question": "Question 7", "answer": "cablam", "answerValue": "noneOfThese"},
      |                {"questionId": "completionCapacityFillingInFor", "question": "Question 8", "answer": "weez", "answerValue": {
      |                "name": {
      |                    "first": "This is my first",
      |                    "middle": "This is my middle name",
      |                    "surname": "This is my surname"
      |                    },
      |                "role": "director"
      |                 }
      |                }
      |              ]
      |            }
      |          ]
      |         }
                                           """.stripMargin)

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DocoptNet;
using Microsoft.Xtc.Common.Cli.Commands;
using Microsoft.Xtc.Common.Cli.Utilities;

namespace Microsoft.Xtc.Cli.Commands
{
    public class HelpCommandDescription: ICommand
    {
        public const string HelpCommandName = "help";

        public string Name
        {
            get { return HelpCommandName; }
        }

        public string Summary
        {
            get { return "Print help for a command"; }
        }

        public string Syntax
        {
            get
            {
                return $@"Command '{this.Name}': {this.Summary}.

Usage:
  {ProgramUtilities.CurrentExecutableName} [{this.Name}]
  {ProgramUtilities.CurrentExecutableName} {this.Name} <command>
";
            }
        }

        public ICommandExecutor CreateCommandExecutor(IDictionary<string, ValueObject> options, IServiceProvider serviceProvider)
        {
            var commandName = options["<command>"];
            var commandsRegistry = (CommandsRegistry)serviceProvider.GetService(typeof(CommandsRegistry));

            if (commandName?.IsNullOrEmpty ?? true)
            {
                return new ListCommandsCommandExecutor(commandsRegistry);
            }
            else
            {
                return new PrintCommandSyntaxCommandExecutor(commandsRegistry, commandName.ToString());
            }
        }
    }

    public class ListCommandsCommandExecutor: ICommandExecutor
    {
        private readonly CommandsRegistry _commandsRegistry;

        public ListCommandsCommandExecutor(CommandsRegistry commandsRegistry)
        {
            if (commandsRegistry == null)
                throw new ArgumentNullException(nameof(commandsRegistry));

            _commandsRegistry = commandsRegistry;
        }

        public Task ExecuteAsync()
        {
            var allCommands = _commandsRegistry.Commands.Values.OrderBy(d => d.Name);

            Console.WriteLine($@"Usage: {ProgramUtilities.CurrentExecutableName} <command> [options]");
            Console.WriteLine("Available commands:");

            var longestLength = allCommands.Max(c => c.Name.Length);

            foreach (var commandDescription in allCommands)
            {
                Console.WriteLine(
                    $"  {commandDescription.Name.PadRight(longestLength + 3)} {commandDescription.Summary}");
            }

            return Tasks.Completed;
        }
    }

    public class PrintCommandSyntaxCommandExecutor: ICommandExecutor
    {
        private readonly ICommand _command;

        public PrintCommandSyntaxCommandExecutor(CommandsRegistry commandsRegistry, string commandName)
        {
            if (commandsRegistry == null)
                throw new ArgumentNullException(nameof(commandsRegistry));
            if (commandName == null)
                throw new ArgumentNullException(nameof(commandName));

            if (!commandsRegistry.Commands.TryGetValue(commandName, out _command))
                throw new ArgumentException($"Unknown command {commandName}", nameof(commandName));
        }

        public Task ExecuteAsync()
        {
            Console.WriteLine(_command.Syntax);

            return Tasks.Completed;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="mcoo.mcoo_gn_frontend" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".CharacterActivity"
            android:label="@string/title_activity_character" >
        </activity>
    </application>

</manifest>


text:
'use strict';
angular.module('app')
        .controller('extrasCtrl', extrasCtrl);

extrasCtrl.$inject = ['$scope', '$http', 'configService'];
function extrasCtrl($scope, $http, configService) {

    $scope.sizeImages = 0;
    $scope.sizeVideos = 0;
    $scope.sizePrmotions = 0;

    $http.get('https://r4mhv473uk.execute-api.us-west-2.amazonaws.com/prod/dbimages?TableName=image', configService.getConfig()).then(function (res) {

        for (var item in  res.data.Items) {
            if (res.data.Items[item].user['S'] == window.sessionStorage.getItem('user').toString())
                $scope.sizeImages++;
        }

    });
    $http.get('https://1y0rxj9ll6.execute-api.us-west-2.amazonaws.com/prod/dbvideos?TableName=video', configService.getConfig()).then(function (res) {

        for (var item in  res.data.Items) {
            if (res.data.Items[item].user['S'] == window.sessionStorage.getItem('user').toString())
                $scope.sizeVideos++;
        }

    });

    $http.get('https://fj40cj5l8f.execute-api.us-west-2.amazonaws.com/prod/promotios?TableName=promotion', configService.getConfig()).then(function (res){

        for (var item in  res.data.Items) {
            if (res.data.Items[item].user['S'] == window.sessionStorage.getItem('user').toString())
                $scope.sizePrmotions++;
        }

    });

}


text:
PrefProxyConfigTracker::PrefProxyConfigTracker(PrefService* pref_service)
    : pref_service_(pref_service) {
  config_state_ = ReadPrefConfig(&pref_config_);
  proxy_prefs_observer_.reset(
      PrefSetObserver::CreateProxyPrefSetObserver(pref_service_, this));
}

PrefProxyConfigTracker::~PrefProxyConfigTracker() {
  DCHECK(pref_service_ == NULL);
}

PrefProxyConfigTracker::ConfigState
    PrefProxyConfigTracker::GetProxyConfig(net::ProxyConfig* config) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
  if (config_state_ != CONFIG_UNSET)
    *config = pref_config_;
  return config_state_;
}

void PrefProxyConfigTracker::DetachFromPrefService() {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  // Stop notifications.
  proxy_prefs_observer_.reset();
  pref_service_ = NULL;
}

void PrefProxyConfigTracker::AddObserver(
    PrefProxyConfigTracker::Observer* observer) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
  observers_.AddObserver(observer);
}

void PrefProxyConfigTracker::RemoveObserver(
    PrefProxyConfigTracker::Observer* observer) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
  observers_.RemoveObserver(observer);
}

void PrefProxyConfigTracker::Observe(NotificationType type,
                                     const NotificationSource& source,
                                     const NotificationDetails& details) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  if (type == NotificationType::PREF_CHANGED &&
      Source<PrefService>(source).ptr() == pref_service_) {
    net::ProxyConfig new_config;
    ConfigState config_state = ReadPrefConfig(&new_config);
    BrowserThread::PostTask(
        BrowserThread::IO, FROM_HERE,
        NewRunnableMethod(this,
                          &PrefProxyConfigTracker::InstallProxyConfig,
                          new_config, config_state));
  } else {
    NOTREACHED() << "Unexpected notification of type " << type.value;
  }
}

void PrefProxyConfigTracker::InstallProxyConfig(
    const net::ProxyConfig& config,
    PrefProxyConfigTracker::ConfigState config_state) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
  if (config_state_ != config_state ||
      (config_state_ != CONFIG_UNSET && !pref_config_.Equals(config))) {
    config_state_ = config_state;
    if (config_state_ != CONFIG_UNSET)
      pref_config_ = config;
    FOR_EACH_OBSERVER(Observer, observers_, OnPrefProxyConfigChanged());
  }
}

PrefProxyConfigTracker::ConfigState
    PrefProxyConfigTracker::ReadPrefConfig(net::ProxyConfig* config) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  // Clear the configuration.
  *config = net::ProxyConfig();

  const PrefService::Preference* pref =
      pref_service_->FindPreference(prefs::kProxy);
  const DictionaryValue* dict = pref_service_->GetDictionary(prefs::kProxy);
  DCHECK(dict);
  ProxyConfigDictionary proxy_dict(dict);

  if (PrefConfigToNetConfig(proxy_dict, config)) {
    return (!pref->IsUserModifiable() || pref->HasUserSetting()) ?
        CONFIG_PRESENT : CONFIG_FALLBACK;
  }

  return CONFIG_UNSET;
}

bool PrefProxyConfigTracker::PrefConfigToNetConfig(
    const ProxyConfigDictionary& proxy_dict,
    net::ProxyConfig* config) {
  ProxyPrefs::ProxyMode mode;
  if (!proxy_dict.GetMode(&mode)) {
    // Fall back to system settings if the mode preference is invalid.
    return false;
  }

  switch (mode) {
    case ProxyPrefs::MODE_SYSTEM:
      // Use system settings.
      return true;
    case ProxyPrefs::MODE_DIRECT:
      // Ignore all the other proxy config preferences if the use of a proxy
      // has been explicitly disabled.
      return true;
    case ProxyPrefs::MODE_AUTO_DETECT:
      config->set_auto_detect(true);
      return true;
    case ProxyPrefs::MODE_PAC_SCRIPT: {
      std::string proxy_pac;
      if (!proxy_dict.GetPacUrl(&proxy_pac)) {
        LOG(ERROR) << "Proxy settings request PAC script but do not specify "
                   << "its URL. Falling back to direct connection.";
        return true;
      }
      GURL proxy_pac_url(proxy_pac);
      if (!proxy_pac_url.is_valid()) {
        LOG(ERROR) << "Invalid proxy PAC url: " << proxy_pac;
        return true;
      }
      config->set_pac_url(proxy_pac_url);
      return true;
    }
    case ProxyPrefs::MODE_FIXED_SERVERS: {
      std::string proxy_server;
      if (!proxy_dict.GetProxyServer(&proxy_server)) {
        LOG(ERROR) << "Proxy settings request fixed proxy servers but do not "
                   << "specify their URLs. Falling back to direct connection.";
        return true;
      }
      config->proxy_rules().ParseFromString(proxy_server);

      std::string proxy_bypass;
      if (proxy_dict.GetBypassList(&proxy_bypass)) {
        config->proxy_rules().bypass_rules.ParseFromString(proxy_bypass);
      }
      return true;
    }
    case ProxyPrefs::kModeCount: {
      // Fall through to NOTREACHED().
    }
  }
  NOTREACHED() << "Unknown proxy mode, falling back to system settings.";
  return false;
}

PrefProxyConfigService::PrefProxyConfigService(
    PrefProxyConfigTracker* tracker,
    net::ProxyConfigService* base_service)
    : base_service_(base_service),
      pref_config_tracker_(tracker),
      registered_observers_(false) {
}

PrefProxyConfigService::~PrefProxyConfigService() {
  if (registered_observers_) {
    base_service_->RemoveObserver(this);
    pref_config_tracker_->RemoveObserver(this);
  }
}

void PrefProxyConfigService::AddObserver(
    net::ProxyConfigService::Observer* observer) {
  RegisterObservers();
  observers_.AddObserver(observer);
}

void PrefProxyConfigService::RemoveObserver(
    net::ProxyConfigService::Observer* observer) {
  observers_.RemoveObserver(observer);
}

net::ProxyConfigService::ConfigAvailability
    PrefProxyConfigService::GetLatestProxyConfig(net::ProxyConfig* config) {
  RegisterObservers();
  net::ProxyConfig pref_config;
  PrefProxyConfigTracker::ConfigState state =
      pref_config_tracker_->GetProxyConfig(&pref_config);
  if (state == PrefProxyConfigTracker::CONFIG_PRESENT) {
    *config = pref_config;
    return CONFIG_VALID;
  }

  // Ask the base service.
  ConfigAvailability available = base_service_->GetLatestProxyConfig(config);

  // Base service doesn't have a configuration, fall back to prefs or default.
  if (available == CONFIG_UNSET) {
    if (state == PrefProxyConfigTracker::CONFIG_FALLBACK)
      *config = pref_config;
    else
      *config = net::ProxyConfig::CreateDirect();
    return CONFIG_VALID;
  }

  return available;
}

void PrefProxyConfigService::OnLazyPoll() {
  base_service_->OnLazyPoll();
}

void PrefProxyConfigService::OnProxyConfigChanged(
    const net::ProxyConfig& config,
    ConfigAvailability availability) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));

  // Check whether there is a proxy configuration defined by preferences. In
  // this case that proxy configuration takes precedence and the change event
  // from the delegate proxy service can be disregarded.
  net::ProxyConfig actual_config;
  if (pref_config_tracker_->GetProxyConfig(&actual_config) !=
          PrefProxyConfigTracker::CONFIG_PRESENT) {
    availability = GetLatestProxyConfig(&actual_config);
    FOR_EACH_OBSERVER(net::ProxyConfigService::Observer, observers_,
                      OnProxyConfigChanged(actual_config, availability));
  }
}

void PrefProxyConfigService::OnPrefProxyConfigChanged() {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));

  // Evaluate the proxy configuration. If GetLatestProxyConfig returns
  // CONFIG_PENDING, we are using the system proxy service, but it doesn't have
  // a valid configuration yet. Once it is ready, OnProxyConfigChanged() will be
  // called and broadcast the proxy configuration.
  // Note: If a switch between a preference proxy configuration and the system
  // proxy configuration occurs an unnecessary notification might get send if
  // the two configurations agree. This case should be rare however, so we don't
  // handle that case specially.
  net::ProxyConfig new_config;
  ConfigAvailability availability = GetLatestProxyConfig(&new_config);
  if (availability != CONFIG_PENDING) {
    FOR_EACH_OBSERVER(net::ProxyConfigService::Observer, observers_,
                      OnProxyConfigChanged(new_config, availability));
  }
}

void PrefProxyConfigService::RegisterObservers() {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
  if (!registered_observers_) {
    base_service_->AddObserver(this);
    pref_config_tracker_->AddObserver(this);
    registered_observers_ = true;
  }
}

// static
void PrefProxyConfigService::RegisterPrefs(PrefService* pref_service) {
  DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem();
  pref_service->RegisterDictionaryPref(prefs::kProxy, default_settings);
}


text:
package org.xsaas.xstat.dao.hibernate;

import java.sql.SQLException;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateCallback;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.xsaas.xstat.dao.IQuestionInfoDao;
import org.xsaas.xstat.po.QuestionInfo;

public class QuestionInfoDao extends HibernateDaoSupport implements IQuestionInfoDao {

	/**
	 * ɾ³ýÎʾíÐÅÏ¢
	 */
	public void delete(QuestionInfo data) {
		this.getHibernateTemplate().delete(data);
	}
	/**
	 * ¸ù¾Ý±àºÅ»ñÈ¡ÐÅÏ¢Áбí
	 */
	public QuestionInfo getQuestionInfo(Long questionID) {

		return (QuestionInfo) this.getHibernateTemplate().get(QuestionInfo.class, questionID);
	}
	/**
	 * ±£´æÎʾíÐÅÏ¢
	 */
	public void save(QuestionInfo data) {
		this.getHibernateTemplate().save(data);

	}

	/**
	 * ¸üÐÂÎʾíÐÅÏ¢
	 */
	public void update(QuestionInfo data) {

		this.getHibernateTemplate().update(data);
	}
	/**
	 * »ñÈ¡ÁбíÐÅÏ¢
	 */

	@SuppressWarnings("unchecked")
	public List<QuestionInfo> getQuestionInfoList() {
		List<QuestionInfo> list = this.getHibernateTemplate().executeFind(new HibernateCallback() {
			 public Object doInHibernate(Session s) throws HibernateException, SQLException {
				 Criteria query = s.createCriteria(QuestionInfo.class);
				 query.add(Restrictions.eq("status", 1));
				 query.addOrder(Order.desc("questionID"));
				 query.setMaxResults(Integer.MAX_VALUE);
				 return query.list();
			 }
		});
		return list;
	}
	/**
	 * ͨ¹ýÖ¸¶¨µÄÆð'ÊýºÍ½áÊøÊýµÃµ½Ò»¸ö¼¯ºÏ
	 * @param firstResult
	 * @param maxResult
	 * @return list<QuestionInfo>
	 */
	@SuppressWarnings("unchecked")
	public List<QuestionInfo> findByPage(final int questionType,final String keyword, final int firstResult,final int maxResult) {
		List<QuestionInfo> list = this.getHibernateTemplate().executeFind(new HibernateCallback() {
			 public Object doInHibernate(Session s) throws HibernateException, SQLException {
				 Criteria query = s.createCriteria(QuestionInfo.class);
				 query.add(Restrictions.eq("status", 1));
				 query.add(Restrictions.eq("questionType",questionType));
				 query.add(Restrictions.or(Restrictions.like("question", "%"+keyword+"%"), Restrictions.like("zhExplain", "%"+keyword+"%")));
				 query.addOrder(Order.desc("questionID"));
				 query.setFirstResult(firstResult);
				 query.setMaxResults(maxResult);
				 return query.list();
			 }
		});
		return list;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<QuestionInfo> findPageByDelStatus(final int firstResult,final int maxResult) {
		List<QuestionInfo> list = this.getHibernateTemplate().executeFind(new HibernateCallback() {
			 public Object doInHibernate(Session s) throws HibernateException, SQLException {
				 Criteria query = s.createCriteria(QuestionInfo.class);
				 query.add(Restrictions.eq("status", 2));
				 query.addOrder(Order.desc("questionID"));
				 query.setFirstResult(firstResult);
				 query.setMaxResults(maxResult);
				 return query.list();
			 }
		});
		return list;
	}

	@SuppressWarnings("unchecked")
	@Override
	public int getTotalByDelStatus() {
		Criteria query = this.getSession().createCriteria(QuestionInfo.class);
		query.add(Restrictions.eq("status", 2));
		query.setProjection(Projections.count("questionID"));
		query.setMaxResults(1);
		List list = query.list();
		int result = 0;
		if(list.size() > 0) {
			result = (Integer)list.get(0);
		}
		return result;
	}
	/**
	 * »ñÈ¡Ö¸¶¨ÎÊÌâÀàÐ͵ÄÎÊÌâÁбí
	 * @param questionType
	 * @param firstResult
	 * @param maxResult
	 * @return List<QuestionInfo>
	 */
	@SuppressWarnings("unchecked")
	public List<QuestionInfo> findByPage(final int questionType, final int firstResult,final int maxResult) {
		List<QuestionInfo> list = this.getHibernateTemplate().executeFind(new HibernateCallback() {
			 public Object doInHibernate(Session s) throws HibernateException, SQLException {
				 Criteria query = s.createCriteria(QuestionInfo.class);
				 query.add(Restrictions.eq("status", 1));
				 query.add(Restrictions.eq("questionType",questionType));
				 query.addOrder(Order.desc("questionID"));
				 query.setFirstResult(firstResult);
				 query.setMaxResults(maxResult);
				 return query.list();
			 }
		});
		return list;
	}
	@SuppressWarnings("unchecked")
	public List<QuestionInfo> findByPage(final int firstResult,final int maxResult) {
		List<QuestionInfo> list = this.getHibernateTemplate().executeFind(new HibernateCallback() {
			 public Object doInHibernate(Session s) throws HibernateException, SQLException {
				 Criteria query = s.createCriteria(QuestionInfo.class);
				 query.add(Restrictions.eq("status", 1));
				 query.addOrder(Order.desc("questionID"));
				 query.setFirstResult(firstResult);
				 query.setMaxResults(maxResult);
				 return query.list();
			 }
		});
		return list;
	}
	/**
	 * ͨ¹ýÖ¸¶¨µÄÆð'Êý»ñÈ¡×ܼ¯ºÏ
	 * @return ×ÜÊý
	 */
	@SuppressWarnings("unchecked")
	public int getTotal() {
		Criteria query = this.getSession().createCriteria(QuestionInfo.class);
		 query.add(Restrictions.eq("status", 1));
		query.setProjection(Projections.count("questionID"));
		query.setMaxResults(1);
		List list = query.list();
		int result = 0;
		if(list.size() > 0) {
			result = (Integer)list.get(0);
		}
		return result;
	}

	@SuppressWarnings("unchecked")
	@Override
	public int getTotal(int questionType, String keyword) {
		Criteria query = this.getSession().createCriteria(QuestionInfo.class);
		 query.add(Restrictions.eq("status", 1));
		query.setProjection(Projections.count("questionID"));
		query.add(Restrictions.eq("questionType",questionType));
		query.add(Restrictions.or(Restrictions.like("question", "%"+keyword+"%"), Restrictions.like("zhExplain", "%"+keyword+"%")));
		query.setMaxResults(1);
		List list = query.list();
		int result = 0;
		if(list.size() > 0) {
			result = (Integer)list.get(0);
		}
		return result;
	}
	@SuppressWarnings("unchecked")
	@Override
	public int getTotal(int questionType) {
		Criteria query = this.getSession().createCriteria(QuestionInfo.class);
		 query.add(Restrictions.eq("status", 1));
		query.setProjection(Projections.count("questionID"));
		query.add(Restrictions.eq("questionType", questionType));
		query.setMaxResults(1);
		List list = query.list();
		int result = 0;
		if(list.size() > 0) {
			result = (Integer)list.get(0);
		}
		return result;
	}
	@SuppressWarnings("unchecked")
	@Override
	public List<QuestionInfo> findByPage(final String keyword, final int firstResult,final int maxResult) {
		List<QuestionInfo> list = this.getHibernateTemplate().executeFind(new HibernateCallback() {
			 public Object doInHibernate(Session s) throws HibernateException, SQLException {
				 Criteria query = s.createCriteria(QuestionInfo.class);
				 query.add(Restrictions.eq("status", 1));
				 query.add(Restrictions.or(Restrictions.like("question", "%"+keyword+"%"), Restrictions.like("zhExplain", "%"+keyword+"%")));
				 query.addOrder(Order.desc("questionID"));
				 query.setFirstResult(firstResult);
				 query.setMaxResults(maxResult);
				 return query.list();
			 }
		});
		return list;
	}
	@SuppressWarnings("unchecked")
	@Override
	public int getTotal(String keyword) {
		Criteria query = this.getSession().createCriteria(QuestionInfo.class);
		 query.add(Restrictions.eq("status", 1));
		query.setProjection(Projections.count("questionID"));
		query.add(Restrictions.or(Restrictions.like("question", "%"+keyword+"%"), Restrictions.like("zhExplain", "%"+keyword+"%")));
		query.setMaxResults(1);
		List list = query.list();
		int result = 0;
		if(list.size() > 0) {
			result = (Integer)list.get(0);
		}
		return result;
	}
}


text:
package ubic.gemma.web.services.rest.util.args;

import ubic.gemma.web.services.rest.util.GemmaApiException;

import java.util.List;

/**
 * Class representing an API argument that should be an array.
 *
 * @author tesarst
 */
public abstract class ArrayArg<T> extends MalformableArg {
    static final String ERROR_MSG = "Value '%s' can not converted to an array of ";

    private List<T> values;

    ArrayArg( List<T> values ) {
        this.values = values;
    }

    ArrayArg( String errorMessage, Exception exception ) {
        super( errorMessage, exception );
    }

    /**
     * @return the list of values parsed from the original String argument. If the original argument could not be
     * parsed into a list, will produce a {@link GemmaApiException} instead.
     */
    public List<T> getValue() {
        this.checkMalformed();
        return values;
    }

}


text:
using System.Text;

namespace System.Diagnostics
{
    public partial class StackFrame
    {
        /// <summary>
        /// Called from the class "StackTrace"
        /// </summary>
        internal StackFrame(StackFrameHelper stackFrameHelper, int skipFrames, bool needFileInfo)
        {
            _method = stackFrameHelper.GetMethodBase(skipFrames);
            _nativeOffset = stackFrameHelper.GetOffset(skipFrames);
            _ilOffset = stackFrameHelper.GetILOffset(skipFrames);
            _isLastFrameFromForeignExceptionStackTrace = stackFrameHelper.IsLastFrameFromForeignExceptionStackTrace(skipFrames);

            if (needFileInfo)
            {
                _fileName = stackFrameHelper.GetFilename(skipFrames);
                _lineNumber = stackFrameHelper.GetLineNumber(skipFrames);
                _columnNumber = stackFrameHelper.GetColumnNumber(skipFrames);
            }
        }

        private void BuildStackFrame(int skipFrames, bool needFileInfo)
        {
            StackFrameHelper StackF = new StackFrameHelper(null);

            StackF.InitializeSourceInfo(0, needFileInfo, null);

            int iNumOfFrames = StackF.GetNumberOfFrames();

            skipFrames += StackTrace.CalculateFramesToSkip(StackF, iNumOfFrames);

            if ((iNumOfFrames - skipFrames) > 0)
            {
                _method = StackF.GetMethodBase(skipFrames);
                _nativeOffset = StackF.GetOffset(skipFrames);
                _ilOffset = StackF.GetILOffset(skipFrames);
                if (needFileInfo)
                {
                    _fileName = StackF.GetFilename(skipFrames);
                    _lineNumber = StackF.GetLineNumber(skipFrames);
                    _columnNumber = StackF.GetColumnNumber(skipFrames);
                }
            }
        }

        private bool AppendStackFrameWithoutMethodBase(StringBuilder sb) => false;
    }
}


text:
By default, osbs-client expects configuration file at `/etc/osbs.conf`. You can change this behaviour with command line option `--config`.

Configuration file uses ini syntax:

```
[section]
key=value
# comment
```

## Options

There is section `[general]` which contains global configuration for all instances. You can put more sections to your config which represents multiple instances of OSBS (and then you can refer to them with command line option `--instance`).

### Types

Options may be either string or boolean. For boolean, these values are considered false: `false`, `FALSE`, `False`, `0`; and these are true: `true`, `TRUE`, `True`, `1`.

Some options are also mandatory.

### `[general]` options

* `build_json_dir` (**mandatory**, `string`) — path to directory with build json templates

* `verbose` (*optional*, `boolean`) — enable verbose logging

* `openshift_required_version` (*optional*, `string`) — required version to run against (adjusts build template as appropriate)

### instance options

* `openshift_uri` (**mandatory**, `string`) — root URL where openshift master API server is listening (e.g. `localhost:8443`)

* `git_url` (*optional*, `string`) — URL of git reposiotry where dockerfile lives (it is used to perform `git clone`)

* `git_ref` (*optional*, `string`) — name of git ref (branch/commit) to check out

* `user` (*optional*, `string`) — namespace in final docker image name (`user/component:tag`)

* `component` (*optional*, `string`) — image name in final docker image name (`user/component:tag`)

* `yum_repourls` (*optional*, `string`) — URL to content of yum repo file (which is downloaded and inserted into build process)

* `namespace` (*optional*, `string`) — name of [kubernetes namespace](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/namespaces.md) to use

* `koji_root` (*optional*, `string`) — URL of koji root (for Fedora it is `http://koji.fedoraproject.org/`)

* `koji_hub` (*optional*, `string`) — URL of koji hub — XMLRPC (for Fedora it is `http://koji.fedoraproject.org/kojihub`)

* `koji_target` (*optional*, `string`) — name of koji target from which packages should be fetched

* `koji_certs_secret` (*optional*, `string`) — name of [kubernetes secret](https://github.com/kubernetes/kubernetes/blob/master/docs/design/secrets.md) to use for koji authentication

* `koji_use_kerberos` (*optional*, `boolean`) — will set [atomic-reactor](https://github.com/projectatomic/atomic-reactor) plugins to use kerberos to authenticate to koji.

* `koji_kerberos_keytab` (*optional*, `string`) - location of the keytab that will be used to initialize kerberos credentials for [atomic-reactor](https://github.com/projectatomic/atomic-reactor) plugins - usually in the form `FILE:<absolute_path>`, see [kerberos documentation](http://web.mit.edu/Kerberos/krb5-latest/doc/basic/keytab_def.html) for other possible values

* `koji_kerberos_principal` (*optional*, `string`) - kerberos principal for the keytab provided in `koji_kerberos_keytab`

* `sources_command` (*optional*, `string`) — command to use to get dist-git artifacts from lookaside cache (e.g. `fedpkg sources`)

* `username`, `password` (*optional*, `string`) — when OpenShift is hidden behind authentication proxy, you can specify username and password for basic authentication

* `use_kerberos` (*optional*, `boolean`) — when OpenShift is hidden behind authentication proxy, you can use kerberos for authentication

* `client_cert`, `client_key` (*optional*, `string`) - paths to PEM-encoded client certificate and key to be used for authentication

* `kerberos_keytab` (*optional*, `string`) - location of the keytab that will be used to initialize kerberos credentials - usually in the form `FILE:<absolute_path>`, see [kerberos documentation](http://web.mit.edu/Kerberos/krb5-latest/doc/basic/keytab_def.html) for other possible values

* `kerberos_principal` (*optional*, `string`) - kerberos principal for the keytab provided in `kerberos_keytab`

* `kerberos_ccache` (*optional*, `string`) - location of credential cache to use when `kerberos_keytab` is set (please refer to [kerberos documentation](http://web.mit.edu/Kerberos/krb5-latest/doc/basic/ccache_def.html) for list of credential cache types)

* `registry_uri` (*optional*, `string`) — docker registry URI to use for pulling and pushing images. More than one can be specified by separating them with commas, and the registry API version for each can be specified by affixing '/v1' or '/v2' onto the end of the registry URI

* `registry_api_versions` (*optional*, `string`) — comma-separated list of docker registry HTTP API versions to support, defaults to `v1,v2`

* `source_registry_uri` (*optional*, `string`) — URI of docker registry from which image is pulled

* `pulp_registry_name` (*optional*, `string`) — name of pulp registry within dockpulp config

* `verify_ssl` (*optional*, `boolean`) — verify SSL certificates during secure connection?

* `vendor` (*optional*, `string`) — content of `vendor` label to be set

* `build_host` (*optional*, `string`) — content of `com.redhat.build-host` label to be set

* `architecture` (*optional*, `string`) — content of `architecture` label to be set

* `authoritative_registry` (*optional*, `string`) — content of `authoritative-source` label to be set

* `distribution_scope` (*optional*, `string`) - content of `distribution-scope` label to be set - possible values are `private`, `authoritative-source-only`, `restricted`, and `public`

* `use_auth` (*optional*, `boolean`) — by default, osbs-client is trying to authenticate against OpenShift master to get OAuth token; you may disable the process with this option

* `token` (*optional*, `string`) - OAuth token used to authenticate against OpenShift

* `builder_use_auth` (*optional*, `boolean`) — whether atomic-reactor plugins which in turn use osbs-client from within the build pod should try to authenticate against OpenShift master; defaults to `use_auth`

* `builder_openshift_url` (*optional*, `string`) — url of OpenShift where builder will connect

* `pulp_secret` (*optional*, `string`) — name of [kubernetes secret](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/design/secrets.md) to use for pulp plugin

* `smtp_host` (*optional*, `string`) - SMTP server host, e.g. `smtp.mycompany.com`

* `smtp_from` (*optional*, `string`) - Address to send notifications from, e.g. `user@mycompany.com`

* `smtp_additional_addresses` (*optional*, `string`) - A comma-separated list of additional addresses to include in notifications, e.g. `user1@mycompany.com, user2@mycompany.com`

* `smtp_error_addresses` (*optional*, `string`) - if the plugin has encountered an error the notification will be sent to this list of comma-separated addresses, e.g. `osbs-admin@mycompany.com, osbs-contact@mycompany.com`

* `smtp_email_domain` (*optional*, `string`) - construct email for users if it cannot be guessed from Koji's kerberos principals, e.g. `mycompany.com`

* `smtp_to_submitter` (*optional*, `boolean`) - whether Atomic Reactor should send a notification to koji task submitter

* `smtp_to_pkgowner` (*optional*, `boolean`) - whether Atomic Reactor should send a notification to koji package owner

* `nfs_server_path` (*optional*, `string`) — NFS server and path to use for storing built image (it is passed to `mount` command)

* `nfs_dest_dir` (*optional*, `string`) — directory to create on provided NFS server where image will be stored

* `cpu_limit` (*optional*, `string`) — CPU limit to apply to build (for more info, see [documentation for resources](https://github.com/projectatomic/osbs-client/blob/master/docs/resource.md)

* `memory_limit` (*optional*, `string`) — memory limit to apply to build (for more info, see [documentation for resources](https://github.com/projectatomic/osbs-client/blob/master/docs/resource.md)

* `storage_limit` (*optional*, `string`) — storage limit to apply to build (for more info, see [documentation for resources](https://github.com/projectatomic/osbs-client/blob/master/docs/resource.md)

* `reactor_config_secret` (*optional*, `string`) — name of Kubernetes secret holding [atomic-reactor configuration file](https://github.com/projectatomic/atomic-reactor/blob/master/docs/config.md)

* `client_config_secret` (*optional*, `string`) — name of Kubernetes secret holding osbs.conf to be used by atomic-reactor in the builder image (this is provided to the orchestrate_build plugin if present)

* `token_secrets` (*optional*, `string`) — whitespace-separated list of secret names with optional mount path in the format secret[:path], which can be used to hold service account tokens referenced by token_file in the osbs_client_secret osbs.conf

* `arrangement_version` (*optional*, `integer`) — default version of inner template to use when creating orchestrator build

* `can_orchestrate` (*optional*, `boolean`) — allows using orchestrator build, default is false

* `info_url_format` (*optional*, `string`) — format for `url` Dockerfile label, used as a Python format string; replacement field keywords are label names, and they will be replaced with the value of the named label

* `artifacts_allowed_domains` (*optional*, `string`) — list of domains allowed to be used when fetching artifacts via URL. When not specified, all domains are allowed.

* `scratch_build_node_selector` (*optional*, `string`) — a node selector to be applied to the scratch builds

* `explicit_build_node_selector` (*optional*, `string`) — a node selector to be applied to explicit builds

* `auto_build_node_selector` (*optional*, `string`) — a node selector to be applied to auto builds

* `node_selector.`*platform* (*optional*, `string`) — a node selector to be used for worker builds for the specified platform, or "none"

* `equal_labels` (*optional*, `string`) — list of equal-preference label groups; if any of each set is missing, aliases will be added to complete the set; label delimiter ':', group delimiter ',' (e.g. `name1:name2:name3, release1:release2, version1:version2`)

* `group_manifests` (*optional*, `boolean`) — whether Atomic Reactor should create manifest lists, default is false

* `prefer_schema1_digest` (*optional*, `boolean`) — used by Atomic Reactor's koji_upload plugin when deciding which digest should be used in the image output files for a Koji build

## Build JSON Templates

In the `build_json_dir` there must be `prod.json` and `prod_inner.json` which
defines the [OpenShift Build](https://docs.openshift.org/latest/dev_guide/builds.html)
specification that will be used to enable the specific
[atomic-reactor](https://github.com/projectatomic/atomic-reactor) plugins that
should be enabled and the config values for each.

There is also a third file that is optional that can exist along side the
previous two in `build_json_dir` which is `prod_customize.json` and it will
provide the ability to set site-specific customizations such as removing,
plugins, adding plugins, or overriding arguments passed to existing plugins.

For orchestrator builds, there are required as well additional json files,
which have same function as mentioned above, only these are specific for
orchestrator or worker builds.

Based on `prod.json` there are `worker.json` and `orchestrator.json`.

Based on `prod_inner.json` there are `orchestrator_inner:1.json` and `worker_inner:1.json`,
where `1` is `arrangement_version` from configuration file, to specify default version.

Based on `prod_customize.json` there are `orchestrator_customize.json` and `worker_customize.json`.

The syntax of `prod_customize.json` is as follows:

```json
{
    "disable_plugins": [
        {
            "plugin_type": "foo_type",
            "plugin_name": "foo_name"
        },
        {
            "plugin_type": "bar_type",
            "plugin_name": "bar_name"
        }
    ],

    "enable_plugins": [
        {
            "plugin_type": "foo_type",
            "plugin_name": "foo_name",
            "plugin_args": {
                "foo_arg1": "foo_value1",
                "foo_arg2": "foo_value2"
            }
        }
    ]
}
```

Such that:

* `disable_plugins` will define a list of dicts that define the plugin type of the plugin that is to be removed (`prebuild_plugins`, `prepublish_plugins`, `postbuild_plugins`, `exit_plugins`) and the name of the plugin.

* `enable_plugins` will define a list of dicts that is used to add plugins or modify already enabled plugins by overriding args passed to the plugin, these must be defined as key-value pairs as illustrated above. It should be noted that plugins added here will be executed at the end of the list of plugins in that particular `plugin_type` (`prebuild_plugins`, `prepublish_plugins`, `postbuild_plugins`, `exit_plugins`), unless the plugin has already been previously added and this setting is only being used to override args. In the case of arg override, the plugin order execution will not change.


text:
<?php

namespace AppBundle\Entity;

/**
 * FragmentType
 */
class FragmentType
{
    /**
     * @var string
     */
    private $name;

    /**
     * @var integer
     */
    private $idFragmentType;

    /**
     * Set name
     *
     * @param string $name
     *
     * @return FragmentType
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Get idFragmentType
     *
     * @return integer
     */
    public function getIdFragmentType()
    {
        return $this->idFragmentType;
    }
}


text:
package org.wso2.carbon.security.keystore.service;

import java.security.cert.X509Certificate;

public class CertDataDetail extends CertData {
    private X509Certificate certificate;

    public X509Certificate getCertificate() {
        return certificate;
    }

    public void setCertificate(X509Certificate certificate) {
        this.certificate = certificate;
    }
}


text:
package com.google.cloud.compute.v1;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.ApiMessage;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("by GAPIC")
@BetaApi
/** Message representing the validation result for a UrlMap. */
public final class UrlMapValidationResult implements ApiMessage {
  private final List<String> loadErrors;
  private final Boolean loadSucceeded;
  private final List<TestFailure> testFailures;
  private final Boolean testPassed;

  private UrlMapValidationResult() {
    this.loadErrors = null;
    this.loadSucceeded = null;
    this.testFailures = null;
    this.testPassed = null;
  }

  private UrlMapValidationResult(
      List<String> loadErrors,
      Boolean loadSucceeded,
      List<TestFailure> testFailures,
      Boolean testPassed) {
    this.loadErrors = loadErrors;
    this.loadSucceeded = loadSucceeded;
    this.testFailures = testFailures;
    this.testPassed = testPassed;
  }

  @Override
  public Object getFieldValue(String fieldName) {
    if ("loadErrors".equals(fieldName)) {
      return loadErrors;
    }
    if ("loadSucceeded".equals(fieldName)) {
      return loadSucceeded;
    }
    if ("testFailures".equals(fieldName)) {
      return testFailures;
    }
    if ("testPassed".equals(fieldName)) {
      return testPassed;
    }
    return null;
  }

  @Nullable
  @Override
  public ApiMessage getApiMessageRequestBody() {
    return null;
  }

  @Nullable
  @Override
  /**
   * The fields that should be serialized (even if they have empty values). If the containing
   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
   * fields in the field mask) will be serialized. If the containing object does not have a
   * fieldmask, then only non-empty fields will be serialized.
   */
  public List<String> getFieldMask() {
    return null;
  }

  public List<String> getLoadErrorsList() {
    return loadErrors;
  }

  /**
   * Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the
   * reasons.
   */
  public Boolean getLoadSucceeded() {
    return loadSucceeded;
  }

  public List<TestFailure> getTestFailuresList() {
    return testFailures;
  }

  /**
   * If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's
   * indicate the reason of failure.
   */
  public Boolean getTestPassed() {
    return testPassed;
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(UrlMapValidationResult prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  public static UrlMapValidationResult getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final UrlMapValidationResult DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new UrlMapValidationResult();
  }

  public static class Builder {
    private List<String> loadErrors;
    private Boolean loadSucceeded;
    private List<TestFailure> testFailures;
    private Boolean testPassed;

    Builder() {}

    public Builder mergeFrom(UrlMapValidationResult other) {
      if (other == UrlMapValidationResult.getDefaultInstance()) return this;
      if (other.getLoadErrorsList() != null) {
        this.loadErrors = other.loadErrors;
      }
      if (other.getLoadSucceeded() != null) {
        this.loadSucceeded = other.loadSucceeded;
      }
      if (other.getTestFailuresList() != null) {
        this.testFailures = other.testFailures;
      }
      if (other.getTestPassed() != null) {
        this.testPassed = other.testPassed;
      }
      return this;
    }

    Builder(UrlMapValidationResult source) {
      this.loadErrors = source.loadErrors;
      this.loadSucceeded = source.loadSucceeded;
      this.testFailures = source.testFailures;
      this.testPassed = source.testPassed;
    }

    public List<String> getLoadErrorsList() {
      return loadErrors;
    }

    public Builder addAllLoadErrors(List<String> loadErrors) {
      if (this.loadErrors == null) {
        this.loadErrors = new LinkedList<>();
      }
      this.loadErrors.addAll(loadErrors);
      return this;
    }

    public Builder addLoadErrors(String loadErrors) {
      if (this.loadErrors == null) {
        this.loadErrors = new LinkedList<>();
      }
      this.loadErrors.add(loadErrors);
      return this;
    }

    /**
     * Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the
     * reasons.
     */
    public Boolean getLoadSucceeded() {
      return loadSucceeded;
    }

    /**
     * Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the
     * reasons.
     */
    public Builder setLoadSucceeded(Boolean loadSucceeded) {
      this.loadSucceeded = loadSucceeded;
      return this;
    }

    public List<TestFailure> getTestFailuresList() {
      return testFailures;
    }

    public Builder addAllTestFailures(List<TestFailure> testFailures) {
      if (this.testFailures == null) {
        this.testFailures = new LinkedList<>();
      }
      this.testFailures.addAll(testFailures);
      return this;
    }

    public Builder addTestFailures(TestFailure testFailures) {
      if (this.testFailures == null) {
        this.testFailures = new LinkedList<>();
      }
      this.testFailures.add(testFailures);
      return this;
    }

    /**
     * If successfully loaded, this field indicates whether the test passed. If false,
     * 'testFailures's indicate the reason of failure.
     */
    public Boolean getTestPassed() {
      return testPassed;
    }

    /**
     * If successfully loaded, this field indicates whether the test passed. If false,
     * 'testFailures's indicate the reason of failure.
     */
    public Builder setTestPassed(Boolean testPassed) {
      this.testPassed = testPassed;
      return this;
    }

    public UrlMapValidationResult build() {

      return new UrlMapValidationResult(loadErrors, loadSucceeded, testFailures, testPassed);
    }

    public Builder clone() {
      Builder newBuilder = new Builder();
      newBuilder.addAllLoadErrors(this.loadErrors);
      newBuilder.setLoadSucceeded(this.loadSucceeded);
      newBuilder.addAllTestFailures(this.testFailures);
      newBuilder.setTestPassed(this.testPassed);
      return newBuilder;
    }
  }

  @Override
  public String toString() {
    return "UrlMapValidationResult{"
        + "loadErrors="
        + loadErrors
        + ", "
        + "loadSucceeded="
        + loadSucceeded
        + ", "
        + "testFailures="
        + testFailures
        + ", "
        + "testPassed="
        + testPassed
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof UrlMapValidationResult) {
      UrlMapValidationResult that = (UrlMapValidationResult) o;
      return Objects.equals(this.loadErrors, that.getLoadErrorsList())
          && Objects.equals(this.loadSucceeded, that.getLoadSucceeded())
          && Objects.equals(this.testFailures, that.getTestFailuresList())
          && Objects.equals(this.testPassed, that.getTestPassed());
    }
    return false;
  }

  @Override
  public int hashCode() {
    return Objects.hash(loadErrors, loadSucceeded, testFailures, testPassed);
  }
}


text:
package com.aspose.cells.model;

import java.util.ArrayList;
import java.util.List;
public class MultipleFilters {
  private String MatchBlank = null;
  private List<DateTimeGroupItem> MultipleFilterList = new ArrayList<DateTimeGroupItem>();
  /**
	 * getMatchBlank
	 * Gets String
	 * @return MatchBlank
	 */
  public String getMatchBlank() {
    return MatchBlank;
  }

	/**
	 * setMatchBlank
	 * Sets String
	 * @param MatchBlank String
	 */
  public void setMatchBlank(String MatchBlank) {
    this.MatchBlank = MatchBlank;
  }

  /**
	 * getMultipleFilterList
	 * Gets List<DateTimeGroupItem>
	 * @return MultipleFilterList
	 */
  public List<DateTimeGroupItem> getMultipleFilterList() {
    return MultipleFilterList;
  }

	/**
	 * setMultipleFilterList
	 * Sets List<DateTimeGroupItem>
	 * @param MultipleFilterList List<DateTimeGroupItem>
	 */
  public void setMultipleFilterList(List<DateTimeGroupItem> MultipleFilterList) {
    this.MultipleFilterList = MultipleFilterList;
  }

  @Override
  public String toString()  {
    StringBuilder sb = new StringBuilder();
    sb.append("class MultipleFilters {\n");
    sb.append("  MatchBlank: ").append(MatchBlank).append("\n");
    sb.append("  MultipleFilterList: ").append(MultipleFilterList).append("\n");
    sb.append("}\n");
    return sb.toString();
  }
}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

?>
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Fetch Delivers | Pet Supplies Delivered Right To Your Door</title>

    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/grayscale.css">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>font-awesome/css/font-awesome.min">

    <link href="http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">

                <img src="<?php echo base_url();?>img/fetchlogo.gif" width="100" height="36">

                    <a class="navbar-brand page-scroll" href="<?php echo base_url();?>product/products/3">
                        dog

                    <a class="navbar-brand page-scroll" href="<?php echo base_url();?>product/products/2">
                        CAT

                    <a class="navbar-brand page-scroll" href="<?php echo base_url();?>product/products/1">
                        BIRD

                    <a class="navbar-brand page-scroll" href="<?php echo base_url();?>product/products/4">
                        SMALL ANIMAL

                    <a class="navbar-brand page-scroll" href="<?php echo base_url();?>product/products/8">
                        FISH

                    <a class="navbar-brand page-scroll" href="<?php echo base_url();?>product/products/7">
                        REPTILE

                    <a class="navbar-brand page-scroll" href="<?php echo base_url();?>product/products/9">
                        WILD BIRD

                    <a class="navbar-brand page-scroll" href="<?php echo base_url();?>product/products/6">
                        OTHER

                    <a class="navbar-brand page-scroll last" href="<?php echo base_url();?>product/products/2">
                        SALE

                        <button name="singupButton" class="orange-button">SIGNUP</button>

                        <button name="loginButton" class="orange-button">LOGIN</button>

                        <input type="text" value=""><img src="<?php echo base_url();?>img/search.png">