text:
package org.security.crypt.pbe;

import org.bouncycastle.crypto.PBEParametersGenerator;
import org.bouncycastle.crypto.params.KeyParameter;

/**
 * Base class for all PKCS key generators that use a key derivation function
 * that performs iterative hashing operations on a salted password.
 *
 *

 * For a key derivation function f, the following formula applies:

 * derivedKey = f(password, salt, iterations)
 *

 *
 *

 * Classes derived from this class are NOT thread safe.
 *

 *
 * @author shivam
 *
 */
public abstract class AbstractPKCSKeyGenerator implements KeyGenerator {

	/** Default number of iterations taken from examples in PKCS#5v2. */
	public static final int DEFAULT_ITERATION_COUNT = 1000;

	/** Key derifcation function salt. */
	protected byte[] salt;

	/** Key derifcation function iteration count. */
	protected int iterationCount = DEFAULT_ITERATION_COUNT;

	/** {@inheritDoc} */
	public byte[] generate(final char[] password, final int size) {
		if (size < 1) {
			throw new IllegalArgumentException("Size must be positive integer.");
		}

		final PBEParametersGenerator generator = newParamGenerator();
		generator.init(toBytes(password), salt, iterationCount);

		final KeyParameter p = (KeyParameter) generator
				.generateDerivedParameters(size);
		return p.getKey();
	}

	/**
	 * Gets the key derivation function iteration count.
	 *
	 * @param count
	 *            Iteration count. MUST be positive integer.
	 */
	protected void setIterationCount(final int count) {
		if (count < 1) {
			throw new IllegalArgumentException(
					"Count must be positive integer.");
		}
		this.iterationCount = count;
	}

	/**
	 * Creates a new BC parameter generator instance.
	 *
	 * @return New parameter generator.
	 */
	protected abstract PBEParametersGenerator newParamGenerator();

	/**
	 * Converts password characters to bytes in implementation-dependent
	 * fashion.
	 *
	 * @param password
	 *            Password to convert.
	 *
	 * @return Password bytes.
	 */
	protected abstract byte[] toBytes(char[] password);
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Uses of Class gov.nih.nci.cabig.caaers.AbstractNoSecurityTestCase
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
gov.nih.nci.cabig.caaers.AbstractNoSecurityTestCase

Packages that use AbstractNoSecurityTestCase

gov.nih.nci.cabig.caaers.domain

gov.nih.nci.cabig.caaers.domain.factory

gov.nih.nci.cabig.caaers.domain.report

gov.nih.nci.cabig.caaers.domain.repository

gov.nih.nci.cabig.caaers.rules

gov.nih.nci.cabig.caaers.rules.business.service

gov.nih.nci.cabig.caaers.rules.common

gov.nih.nci.cabig.caaers.rules.deploy

gov.nih.nci.cabig.caaers.rules.objectgraph

gov.nih.nci.cabig.caaers.service

gov.nih.nci.cabig.caaers.service.migrator

gov.nih.nci.cabig.caaers.service.synchronizer

gov.nih.nci.cabig.caaers.web

gov.nih.nci.cabig.caaers.web.admin

gov.nih.nci.cabig.caaers.web.ae

gov.nih.nci.cabig.caaers.web.filters

gov.nih.nci.cabig.caaers.web.par

gov.nih.nci.cabig.caaers.web.participant

gov.nih.nci.cabig.caaers.web.rule

gov.nih.nci.cabig.caaers.web.rule.author

gov.nih.nci.cabig.caaers.web.rule.notification

gov.nih.nci.cabig.caaers.web.search

gov.nih.nci.cabig.caaers.web.search.cell

gov.nih.nci.cabig.caaers.web.security

gov.nih.nci.cabig.caaers.web.study

gov.nih.nci.cabig.caaers.web.user

gov.nih.nci.cabig.caaers.web.validation.validator

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.domain

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.domain

 class
AdverseEventCtcTermTest

 class
AdverseEventReportingPeriodTest

 class
ConcomitantMedicationAttributionTest

 class
CourseAgentAttributionTest

 class
DeviceAttributionTest

 class
ExpeditedAdverseEventReportTest

 class
OtherCauseAttributionTest

 class
RadiationAttributionTest

 class
StudyParticipantAssignmentTest

 class
SurgeryAttributionTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.domain.factory

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.domain.factory

 class
ReportFactoryIntegrationTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.domain.report

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.domain.report

 class
ReportTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.domain.repository

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.domain.repository

 class
ReportRepositoryTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules

 class
RulesTestCase

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules.business.service

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules.business.service

 class
EvaluationServiceTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules.common

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules.common

 class
XMLUtilTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules.deploy

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules.deploy

 class
AbstractBusinessRulesExecutionTestCase

 class
AdverseEventBusinessRulesTest

 class
AttributionBusinessRulesTest

 class
EventDescriptionBusinessRulesTest

 class
InterventionLevelBusinessRulesTest

 class
LabBusinessRulesTest

 class
MedicalInfoBusinessRulesTest

 class
PreExistingConditionBusinessRulesTest

 class
PriorTherapyBusinessRulesTest

 class
TreatmentInformationBusinessRulesTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules.objectgraph

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.rules.objectgraph

 class
NullSafeFieldExtractorTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.service

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.service

 class
ParticipantImportServiceIntegrationTest

 class
ReportSubmissionServiceTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.service.migrator

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.service.migrator

 class
StudyParticipantAssignmentMigratorTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.service.synchronizer

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.service.synchronizer

 class
ParticipantSynchronizerIntegrationTest

 class
StudyParticipantAssignmentSynchronizerTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web

 class
CaaersFieldConfigurationManagerTest

          This class test CaaersFieldConfigurationManager class

 class
CreateAdverseEventAjaxFacadeTest

 class
DwrFacadeTestCase

 class
OpenSessionInViewInterceptorFilterTest

 class
RenderDecisionManagerTest

 class
StateInfoInterceptorTest

          StateInfoInterceptor Tester.

 class
WebTestCase

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.admin

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.admin

 class
AgentImporterTest

          Input String has to have 2 tokens.Valid samples as given below
        NSC, Agent Name
        "723227","(161-180)ESO-1 Peptide"
        "726584","(H115D)VHL35 Peptide"
        "726190","(R)-(-)-Gossypol acetic acid (Ascenta's AT-101)"

 class
ImporterFactoryTest

 class
InvestigatorImporterTest

 class
MandatoryFieldsControllerTest

 class
MeddraImporterTest

 class
MessageReloadControllerTest

 class
OrganizationImporterTest

          Input String has to have 5 tokens.Valid samples as given below
                Institution Code,Institution Name,City,State,Country
                "02001","Catedra De Oncologia Univ-Salvador","Buenos Aires","","Argentina"
                "02002","Hospital Militar Central","Buenos Aires","","Argentina"
                "02003","Hospitales Privado Guemes","Buenos Aires","","Argentina"
                "02004","Hosp.

 class
ResearchStaffImporterTest

 class
StudyImporterTest

 class
SubjectImporterTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.ae

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.ae

 class
AdditionalInformationTabTest

 class
AdverseEventCaptureTabTest

 class
AdverseEventHistoryAjaxFacadeTest

 class
AeTabTestCase

 class
AeWebTestCase

 class
AttributionTabTest

 class
CaptureAdverseEventAjaxFacadeTest

 class
CaptureAdverseEventControllerTest

          CaptureAdverseEventController Tester.

 class
CaptureAdverseEventInputCommandTest

          h

 class
CreateReportingPeriodControllerTest

 class
CtcBasicsTabTest

 class
DescriptionTabTest

 class
EditAdverseEventControllerTest

 class
EditExpeditedAdverseEventCommandTest

 class
GenerateBlankFormPdfControllerTest

 class
GenerateExpeditedPdfControllerTest

 class
InterventionsTabTest

 class
LabsTabTest

 class
ListAdverseEventsCommandTest

 class
ListAdverseEventsControllerTest

 class
PatientDetailsTabTest

 class
ReporterTabTest

 class
ReviewAeReportControllerTest

          This class tests - ReviewAeReportController.java

 class
ReviewAndReportTabTest

 class
RoutingAndReviewAjaxFacadeTest

          This class tests RoutingAndReviewAjaxFacade class.

 class
RoutingAndReviewCommentControllerTest

          This class tests - RoutingAndReviewCommentController

 class
RoutingAndReviewControllerTest

          This class tests - RoutingAndReviewController.

 class
RoutingAndReviewResolverControllerTest

          This class tests - RoutingAndReviewResolverController.java

 class
StudyInterventionsTabTest

 class
SubmitFlowTabTestCase

 class
SubmitReportAjaxFacadeTest

          This class tests the class - SubmitReportAjaxFacade

 class
SubmitReportResultTabTest

          This class tests - SubmitReportResultTab.java

 class
SubmitReportTabTest

 class
TreatmentTabTest

 class
ViewReportTabTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.filters

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.filters

 class
GzipFilterTest

          This class is copied from ehcache web constructs, so no testcase for most of the methods....

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.par

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.par

 class
AssignStudyControllerTest

 class
NewParticipantControllerTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.participant

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.participant

 class
AbstractTabTestCase<T extends Tab,C>

 class
CreateParticipantTabTest

 class
EditParticipantTabTest

 class
SubjectFlowAbstractTabTestCase

 class
SubjectMedHistoryTabTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.rule

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.rule

 class
RuleAjaxFacadeTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.rule.author

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.rule.author

 class
CreateRuleControllerTest

          CreateRuleController Tester.

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.rule.notification

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.rule.notification

 class
BasicsTabTest

 class
CreateReportDefinitionControllerTest

 class
ListNotificationControllerTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.search

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.search

 class
AdvancedSearchControllerTest

 class
AdvancedSearchCriteriaParameterTest

          This class test AdvancedSearchCriteriaParameter

 class
AdvancedSearchViewTabTest

          This class tests the AdvancedSearchViewTab

 class
AdverseEventControllerTest

 class
ParticipantControllerTest

 class
ReportControllerTest

 class
RoutineReportControllerTest

 class
StudyControllerTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.search.cell

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.search.cell

 class
AbstractCellTestCase

 class
ParticipantAjaxFacadeTest

 class
StudyAjaxFacadeTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.security

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.security

 class
HttpSessionPurgeLogoutHandlerTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.study

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.study

 class
AbstractStudyWebTestCase

 class
CreateStudyAjaxFacadeTest

 class
CreateStudyControllerTest

 class
DCPDiseaseStudyTest

 class
ExpectedAETabTestCase

 class
SearchStudyControllerTest

 class
SolicitedAETabTestCase

 class
StudyAgentsTabTestCase

 class
StudyCommandTest

 class
StudyDetailsTabTestCase

 class
StudyDiseaseTabTestCase

 class
StudyEmptyTabTestCase

 class
StudyIdentifiersTabTestCase

 class
StudyInvestigatorsTabTestCase

 class
StudyPersonnelTabTestCase

 class
StudySitesTabTestCase

 class
StudyTherapiesTabTestCase

 class
StudyTreatmentAssignmentTabTestCase

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.user

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.user

 class
ChangePasswordControllerTest

Uses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.validation.validator

Subclasses of AbstractNoSecurityTestCase in gov.nih.nci.cabig.caaers.web.validation.validator

 class
AdverseEventReportingPeriodValidatorTest

          This class tests the AdverseEventReportingPeriodValidator class

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

redpajama_set_name: RedPajamaGithub


text:
#ifndef ACSEXMPLASYNCCALLBACKS_H
#define ACSEXMPLASYNCCALLBACKS_H
/*******************************************************************************
* ALMA - Atacama Large Millimiter Array
* (c) European Southern Observatory, 2004
*
*This library is free software; you can redistribute it and/or
*modify it under the terms of the GNU Lesser General Public
*License as published by the Free Software Foundation; either
*version 2.1 of the License, or (at your option) any later version.
*
*This library is distributed in the hope that it will be useful,
*but WITHOUT ANY WARRANTY; without even the implied warranty of
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*Lesser General Public License for more details.
*
*You should have received a copy of the GNU Lesser General Public
*License along with this library; if not, write to the Free Software
*Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*
* "@(#) $Id: acsexmplAsyncCallbacks.h,v 1.2 2008/10/01 04:30:47 cparedes Exp $"
*
* who       when      what
* --------  --------  ----------------------------------------------
* acaproni  2004-08-10  created
*/

// We need CORBA stuffs for baci classes
#include <baciS.h>

#include <ace/SString.h>

/**
 * A redefinition of the CBdouble class to check how it works
 * It is specialized for our needs (in this demo it only prints
 * log messages)
 */
class AsyncCBdouble: public virtual POA_ACS::CBdouble  {
	private:
		// The name of the property
		ACE_CString propertyName;

		// The variable to update when the asynchronous call terminates
		// It is a pointer to a variable of the main program to show
		// how to pass information between the callback and the rest
		// of the world
		double* varToUpdate;

	public:
		/**
		 * Constructor
		 * @param property The name of the property
		 * @param var The poinetr to the variable in the main program
		 */
		 AsyncCBdouble(ACE_CString property, double* var) {
		 	propertyName=property;
		 	varToUpdate=var;
		 }

		 /**
		  * Destructor (nothing to do here)
		  */
		  ~AsyncCBdouble() { }

		void working (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc);

		void done (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc);

		CORBA::Boolean negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc);
};

#endif


text:
using System.Text;

namespace mvectors.logic
{
    public class WrittenSentence
    {
        public WrittenSentence()
        {
            Words = new WrittenWord[0];
        }

        public override string ToString()
        {
            var sb = new StringBuilder();
            bool first = true;
            foreach (var writtenWord in Words)
            {
                if (first)
                {
                    first = false;
                }else
                {
                    sb.Append(' ');
                }
                sb.Append(writtenWord);
            }
            return sb.ToString();
        }

        public WrittenWord[] Words { get; set; }
        public int Length { get { return Words.Length; } }
    }
}


text:
var fs = require('fs');
var xml2js = require('xml2js');
var builder = new xml2js.Builder();
var path = require('path');

var handlers = require('./handlers');

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Manager

/**
 * Represents the class for managing each request type (GET, PUT, POST, etc.)
 *
 * @constructor
 * @param {object} app - An express app
 * @param {string} root - The directory at which to place resource data
 */
function Manager(app, root) {
    var lookupFile = fs.readFileSync('./lib/lookup.json');
    var lookup = JSON.parse(lookupFile);
    // A handler is needed for each request method type
    app.post('/', handlers.post.handler(root, lookup));
}

exports = module.exports = Manager;


text:
require 'armagh/support/encoding'

module Armagh
  module BaseDocument
    module ContentCleanup

      DOT_REPLACEMENT = '~!p!~'
      DOLLAR_REPLACEMENT = '~!d!~'

      def self.clean_image( image )
        clean_hash( image )
      end

      def self.restore_image( image )
        restore_hash( image )
      end

      private_class_method
      def self.clean(object)
        case object
        when String
          clean_string object
        when Hash
          clean_hash object
        when Array
          clean_array object
        else
          object
        end
      end

      private_class_method def self.clean_hash(hash)
        hash.keys.each do |k|
          v = hash[k]
          clean(v)
          if v.nil?
            hash.delete(k)
          elsif k =~ /[.$]/
            hash.delete(k)
            hash[k.gsub('.', DOT_REPLACEMENT).gsub('$', DOLLAR_REPLACEMENT)] = v
          end
        end
        hash
      end

      private_class_method def self.clean_string(string)
        string.strip! unless string.frozen?
      end

      private_class_method def self.clean_array(array)
        array.each{|v| clean(v)}
      end

      private_class_method def self.restore(object)
        case object
        when Hash
          restore_hash object
        when Array
          restore_array object
        else
          object
        end
      end

      private_class_method def self.restore_hash(hash)
        hash.keys.each do |k|
          v = hash[k]
          restore(v)
          if k =~ /(#{DOT_REPLACEMENT}|#{DOLLAR_REPLACEMENT})/
            hash.delete(k)
            hash[k.gsub(DOT_REPLACEMENT, '.').gsub(DOLLAR_REPLACEMENT, '$')] = v
          end
        end
        hash
      end

      def self.restore_array(array)
        array.each{|v| restore(v)}
      end

      def self.fix_encoding( proposed_encoding, target, logger: nil )
        Armagh::Support::Encoding.fix_encoding(target, proposed_encoding: proposed_encoding, logger: logger || @logger)
      end

    end
  end
end


text:
Aula de GitHub

Descrição:é um local onde compartilhar códigos e projetos, além de acompanhar projetos de outros desenvolvedores.

Seção: Wellington Beraldo GitHhub

		<input type="button" name="botao-home" value="Voltar" onclick="history.go(-1)"


text:
.. _geogit-apply:

geogit-apply documentation
#############################

SYNOPSIS
********
geogit apply [<patch_file>] [--reject] [--summary] [--check]

DESCRIPTION
***********

Applies a patch or part of it on the current working tree.

OPTIONS
*******

--check		Do not apply, just check that the specified patch can be safely applied

--reject	apply only those changes that can be safely applied and create a ``.rej`` patch file with those other changes that were rejected and could not be safely applied

--summary	Do not apply, just show content of patch.

SEE ALSO
********

:ref:`geogit-format-patch`

BUGS
****


text:
> Convert matching single-quotes to double-quotes: `I 'love' unicorns` → `I "love" unicorns`

## Install

```
$ npm install --global to-double-quotes-cli
```

## Usage

```
$ to-double-quotes --help

  Usage
    $ to-double-quotes <string>
    $ echo <string> | to-double-quotes

  Example
    $ to-double-quotes "I love 'unicorns'"
    I love "unicorns"
```

## Related

- [to-double-quotes](https://github.com/sindresorhus/to-double-quotes) - API for this module


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.factchecktools.v1alpha1;

/**
 * Service definition for FactCheckTools (v1alpha1).
 *
 *

 *
 *

 *
 *

 * For more information about this service, see the
 * API Documentation
 *

 *
 *

 * This service uses {@link FactCheckToolsRequestInitializer} to initialize global parameters via its
 * {@link Builder}.
 *

 *
 * @since 1.3
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public class FactCheckTools extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {

  // Note: Leave this static initializer at the top of the file.
  static {
    com.google.api.client.util.Preconditions.checkState(
        com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
        com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15,
        "You are currently running with version %s of google-api-client. " +
        "You need at least version 1.15 of google-api-client to run version " +
        "1.26.0 of the Fact Check Tools API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
  }

  /**
   * The default encoded root URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_ROOT_URL = "https://factchecktools.googleapis.com/";

  /**
   * The default encoded service path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_SERVICE_PATH = "";

  /**
   * The default encoded batch path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.23
   */
  public static final String DEFAULT_BATCH_PATH = "batch";

  /**
   * The default encoded base URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   */
  public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;

  /**
   * Constructor.
   *
   *

   * Use {@link Builder} if you need to specify any of the optional parameters.
   *

   *
   * @param transport HTTP transport, which should normally be:
   *

   *
Google App Engine:
   *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}

   *
Android: {@code newCompatibleTransport} from
   *        {@code com.google.api.client.extensions.android.http.AndroidHttp}

   *
Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
   *

   *

   * @param jsonFactory JSON factory, which may be:
   *

   *
Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}

   *
Google GSON: {@code com.google.api.client.json.gson.GsonFactory}

   *
Android Honeycomb or higher:
   *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}

   *

   * @param httpRequestInitializer HTTP request initializer or {@code null} for none
   * @since 1.7
   */
  public FactCheckTools(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
      com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
    this(new Builder(transport, jsonFactory, httpRequestInitializer));
  }

  /**
   * @param builder builder
   */
  FactCheckTools(Builder builder) {
    super(builder);
  }

  @Override
  protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
    super.initialize(httpClientRequest);
  }

  /**
   * An accessor for creating requests from the Claims collection.
   *
   *
The typical use is:

   *

   *   {@code FactCheckTools factchecktools = new FactCheckTools(...);}
   *   {@code FactCheckTools.Claims.List request = factchecktools.claims().list(parameters ...)}
   *

   *
   * @return the resource collection
   */
  public Claims claims() {
    return new Claims();
  }

  /**
   * The "claims" collection of methods.
   */
  public class Claims {

    /**
     * Search through fact-checked claims.
     *
     * Create a request for the method "claims.search".
     *
     * This request holds the parameters needed by the factchecktools server.  After setting any
     * optional parameters, call the {@link Search#execute()} method to invoke the remote operation.
     *
     * @return the request
     */
    public Search search() throws java.io.IOException {
      Search result = new Search();
      initialize(result);
      return result;
    }

    public class Search extends FactCheckToolsRequest<com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse> {

      private static final String REST_PATH = "v1alpha1/claims:search";

      /**
       * Search through fact-checked claims.
       *
       * Create a request for the method "claims.search".
       *
       * This request holds the parameters needed by the the factchecktools server.  After setting any
       * optional parameters, call the {@link Search#execute()} method to invoke the remote operation.
       *
 {@link
       * Search#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
       * be called to initialize this instance immediately after invoking the constructor.

       *
       * @since 1.13
       */
      protected Search() {
        super(FactCheckTools.this, "GET", REST_PATH, null, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse.class);
      }

      @Override
      public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
        return super.executeUsingHead();
      }

      @Override
      public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
        return super.buildHttpRequestUsingHead();
      }

      @Override
      public Search set$Xgafv(java.lang.String $Xgafv) {
        return (Search) super.set$Xgafv($Xgafv);
      }

      @Override
      public Search setAccessToken(java.lang.String accessToken) {
        return (Search) super.setAccessToken(accessToken);
      }

      @Override
      public Search setAlt(java.lang.String alt) {
        return (Search) super.setAlt(alt);
      }

      @Override
      public Search setCallback(java.lang.String callback) {
        return (Search) super.setCallback(callback);
      }

      @Override
      public Search setFields(java.lang.String fields) {
        return (Search) super.setFields(fields);
      }

      @Override
      public Search setKey(java.lang.String key) {
        return (Search) super.setKey(key);
      }

      @Override
      public Search setOauthToken(java.lang.String oauthToken) {
        return (Search) super.setOauthToken(oauthToken);
      }

      @Override
      public Search setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Search) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Search setQuotaUser(java.lang.String quotaUser) {
        return (Search) super.setQuotaUser(quotaUser);
      }

      @Override
      public Search setUploadType(java.lang.String uploadType) {
        return (Search) super.setUploadType(uploadType);
      }

      @Override
      public Search setUploadProtocol(java.lang.String uploadProtocol) {
        return (Search) super.setUploadProtocol(uploadProtocol);
      }

      /**
       * The BCP-47 language code, such as "en-US" or "sr-Latn". Can be used to restrict results by
       * language, though we do not currently consider the region.
       */
      @com.google.api.client.util.Key
      private java.lang.String languageCode;

      /** The BCP-47 language code, such as "en-US" or "sr-Latn". Can be used to restrict results by
     language, though we do not currently consider the region.
       */
      public java.lang.String getLanguageCode() {
        return languageCode;
      }

      /**
       * The BCP-47 language code, such as "en-US" or "sr-Latn". Can be used to restrict results by
       * language, though we do not currently consider the region.
       */
      public Search setLanguageCode(java.lang.String languageCode) {
        this.languageCode = languageCode;
        return this;
      }

      /**
       * The maximum age of the returned search results, in days. Age is determined by either claim
       * date or review date, whichever is newer.
       */
      @com.google.api.client.util.Key
      private java.lang.Integer maxAgeDays;

      /** The maximum age of the returned search results, in days. Age is determined by either claim date or
     review date, whichever is newer.
       */
      public java.lang.Integer getMaxAgeDays() {
        return maxAgeDays;
      }

      /**
       * The maximum age of the returned search results, in days. Age is determined by either claim
       * date or review date, whichever is newer.
       */
      public Search setMaxAgeDays(java.lang.Integer maxAgeDays) {
        this.maxAgeDays = maxAgeDays;
        return this;
      }

      /**
       * An integer that specifies the current offset (that is, starting result location) in search
       * results. This field is only considered if `page_token` is unset. For example, 0 means to
       * return results starting from the first matching result, and 10 means to return from the
       * 11th result.
       */
      @com.google.api.client.util.Key
      private java.lang.Integer offset;

      /** An integer that specifies the current offset (that is, starting result location) in search results.
     This field is only considered if `page_token` is unset. For example, 0 means to return results
     starting from the first matching result, and 10 means to return from the 11th result.
       */
      public java.lang.Integer getOffset() {
        return offset;
      }

      /**
       * An integer that specifies the current offset (that is, starting result location) in search
       * results. This field is only considered if `page_token` is unset. For example, 0 means to
       * return results starting from the first matching result, and 10 means to return from the
       * 11th result.
       */
      public Search setOffset(java.lang.Integer offset) {
        this.offset = offset;
        return this;
      }

      /**
       * The pagination size. We will return up to that many results. Defaults to 10 if not set.
       */
      @com.google.api.client.util.Key
      private java.lang.Integer pageSize;

      /** The pagination size. We will return up to that many results. Defaults to 10 if not set.
       */
      public java.lang.Integer getPageSize() {
        return pageSize;
      }

      /**
       * The pagination size. We will return up to that many results. Defaults to 10 if not set.
       */
      public Search setPageSize(java.lang.Integer pageSize) {
        this.pageSize = pageSize;
        return this;
      }

      /**
       * The pagination token. You may provide the `next_page_token` returned from a previous List
       * request, if any, in order to get the next page. All other fields must have the same values
       * as in the previous request.
       */
      @com.google.api.client.util.Key
      private java.lang.String pageToken;

      /** The pagination token. You may provide the `next_page_token` returned from a previous List request,
     if any, in order to get the next page. All other fields must have the same values as in the
     previous request.
       */
      public java.lang.String getPageToken() {
        return pageToken;
      }

      /**
       * The pagination token. You may provide the `next_page_token` returned from a previous List
       * request, if any, in order to get the next page. All other fields must have the same values
       * as in the previous request.
       */
      public Search setPageToken(java.lang.String pageToken) {
        this.pageToken = pageToken;
        return this;
      }

      /**
       * Textual query string. Required unless `review_publisher_site_filter` is specified.
       */
      @com.google.api.client.util.Key
      private java.lang.String query;

      /** Textual query string. Required unless `review_publisher_site_filter` is specified.
       */
      public java.lang.String getQuery() {
        return query;
      }

      /**
       * Textual query string. Required unless `review_publisher_site_filter` is specified.
       */
      public Search setQuery(java.lang.String query) {
        this.query = query;
        return this;
      }

      /** The review publisher site to filter results by, e.g. nytimes.com. */
      @com.google.api.client.util.Key
      private java.lang.String reviewPublisherSiteFilter;

      /** The review publisher site to filter results by, e.g. nytimes.com.
       */
      public java.lang.String getReviewPublisherSiteFilter() {
        return reviewPublisherSiteFilter;
      }

      /** The review publisher site to filter results by, e.g. nytimes.com. */
      public Search setReviewPublisherSiteFilter(java.lang.String reviewPublisherSiteFilter) {
        this.reviewPublisherSiteFilter = reviewPublisherSiteFilter;
        return this;
      }

      @Override
      public Search set(String parameterName, Object value) {
        return (Search) super.set(parameterName, value);
      }
    }

  }

  /**
   * An accessor for creating requests from the Pages collection.
   *
   *
The typical use is:

   *

   *   {@code FactCheckTools factchecktools = new FactCheckTools(...);}
   *   {@code FactCheckTools.Pages.List request = factchecktools.pages().list(parameters ...)}
   *

   *
   * @return the resource collection
   */
  public Pages pages() {
    return new Pages();
  }

  /**
   * The "pages" collection of methods.
   */
  public class Pages {

    /**
     * Create `ClaimReview` markup on a page.
     *
     * Create a request for the method "pages.create".
     *
     * This request holds the parameters needed by the factchecktools server.  After setting any
     * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
     *
     * @param content the {@link com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage}
     * @return the request
     */
    public Create create(com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage content) throws java.io.IOException {
      Create result = new Create(content);
      initialize(result);
      return result;
    }

    public class Create extends FactCheckToolsRequest<com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage> {

      private static final String REST_PATH = "v1alpha1/pages";

      /**
       * Create `ClaimReview` markup on a page.
       *
       * Create a request for the method "pages.create".
       *
       * This request holds the parameters needed by the the factchecktools server.  After setting any
       * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
       *
 {@link
       * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
       * be called to initialize this instance immediately after invoking the constructor.

       *
       * @param content the {@link com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage}
       * @since 1.13
       */
      protected Create(com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage content) {
        super(FactCheckTools.this, "POST", REST_PATH, content, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.class);
      }

      @Override
      public Create set$Xgafv(java.lang.String $Xgafv) {
        return (Create) super.set$Xgafv($Xgafv);
      }

      @Override
      public Create setAccessToken(java.lang.String accessToken) {
        return (Create) super.setAccessToken(accessToken);
      }

      @Override
      public Create setAlt(java.lang.String alt) {
        return (Create) super.setAlt(alt);
      }

      @Override
      public Create setCallback(java.lang.String callback) {
        return (Create) super.setCallback(callback);
      }

      @Override
      public Create setFields(java.lang.String fields) {
        return (Create) super.setFields(fields);
      }

      @Override
      public Create setKey(java.lang.String key) {
        return (Create) super.setKey(key);
      }

      @Override
      public Create setOauthToken(java.lang.String oauthToken) {
        return (Create) super.setOauthToken(oauthToken);
      }

      @Override
      public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Create) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Create setQuotaUser(java.lang.String quotaUser) {
        return (Create) super.setQuotaUser(quotaUser);
      }

      @Override
      public Create setUploadType(java.lang.String uploadType) {
        return (Create) super.setUploadType(uploadType);
      }

      @Override
      public Create setUploadProtocol(java.lang.String uploadProtocol) {
        return (Create) super.setUploadProtocol(uploadProtocol);
      }

      @Override
      public Create set(String parameterName, Object value) {
        return (Create) super.set(parameterName, value);
      }
    }
    /**
     * Delete all `ClaimReview` markup on a page.
     *
     * Create a request for the method "pages.delete".
     *
     * This request holds the parameters needed by the factchecktools server.  After setting any
     * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
     *
     * @param name The name of the resource to delete, in the form of `pages/{page_id}`.
     * @return the request
     */
    public Delete delete(java.lang.String name) throws java.io.IOException {
      Delete result = new Delete(name);
      initialize(result);
      return result;
    }

    public class Delete extends FactCheckToolsRequest<com.google.api.services.factchecktools.v1alpha1.model.GoogleProtobufEmpty> {

      private static final String REST_PATH = "v1alpha1/{+name}";

      private final java.util.regex.Pattern NAME_PATTERN =
          java.util.regex.Pattern.compile("^pages/[^/]+$");

      /**
       * Delete all `ClaimReview` markup on a page.
       *
       * Create a request for the method "pages.delete".
       *
       * This request holds the parameters needed by the the factchecktools server.  After setting any
       * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
       *
 {@link
       * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
       * be called to initialize this instance immediately after invoking the constructor.

       *
       * @param name The name of the resource to delete, in the form of `pages/{page_id}`.
       * @since 1.13
       */
      protected Delete(java.lang.String name) {
        super(FactCheckTools.this, "DELETE", REST_PATH, null, com.google.api.services.factchecktools.v1alpha1.model.GoogleProtobufEmpty.class);
        this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
              "Parameter name must conform to the pattern " +
              "^pages/[^/]+$");
        }
      }

      @Override
      public Delete set$Xgafv(java.lang.String $Xgafv) {
        return (Delete) super.set$Xgafv($Xgafv);
      }

      @Override
      public Delete setAccessToken(java.lang.String accessToken) {
        return (Delete) super.setAccessToken(accessToken);
      }

      @Override
      public Delete setAlt(java.lang.String alt) {
        return (Delete) super.setAlt(alt);
      }

      @Override
      public Delete setCallback(java.lang.String callback) {
        return (Delete) super.setCallback(callback);
      }

      @Override
      public Delete setFields(java.lang.String fields) {
        return (Delete) super.setFields(fields);
      }

      @Override
      public Delete setKey(java.lang.String key) {
        return (Delete) super.setKey(key);
      }

      @Override
      public Delete setOauthToken(java.lang.String oauthToken) {
        return (Delete) super.setOauthToken(oauthToken);
      }

      @Override
      public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Delete) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Delete setQuotaUser(java.lang.String quotaUser) {
        return (Delete) super.setQuotaUser(quotaUser);
      }

      @Override
      public Delete setUploadType(java.lang.String uploadType) {
        return (Delete) super.setUploadType(uploadType);
      }

      @Override
      public Delete setUploadProtocol(java.lang.String uploadProtocol) {
        return (Delete) super.setUploadProtocol(uploadProtocol);
      }

      /** The name of the resource to delete, in the form of `pages/{page_id}`. */
      @com.google.api.client.util.Key
      private java.lang.String name;

      /** The name of the resource to delete, in the form of `pages/{page_id}`.
       */
      public java.lang.String getName() {
        return name;
      }

      /** The name of the resource to delete, in the form of `pages/{page_id}`. */
      public Delete setName(java.lang.String name) {
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
              "Parameter name must conform to the pattern " +
              "^pages/[^/]+$");
        }
        this.name = name;
        return this;
      }

      @Override
      public Delete set(String parameterName, Object value) {
        return (Delete) super.set(parameterName, value);
      }
    }
    /**
     * Get all `ClaimReview` markup on a page.
     *
     * Create a request for the method "pages.get".
     *
     * This request holds the parameters needed by the factchecktools server.  After setting any
     * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
     *
     * @param name The name of the resource to get, in the form of `pages/{page_id}`.
     * @return the request
     */
    public Get get(java.lang.String name) throws java.io.IOException {
      Get result = new Get(name);
      initialize(result);
      return result;
    }

    public class Get extends FactCheckToolsRequest<com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage> {

      private static final String REST_PATH = "v1alpha1/{+name}";

      private final java.util.regex.Pattern NAME_PATTERN =
          java.util.regex.Pattern.compile("^pages/[^/]+$");

      /**
       * Get all `ClaimReview` markup on a page.
       *
       * Create a request for the method "pages.get".
       *
       * This request holds the parameters needed by the the factchecktools server.  After setting any
       * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

       * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
       * must be called to initialize this instance immediately after invoking the constructor.

       *
       * @param name The name of the resource to get, in the form of `pages/{page_id}`.
       * @since 1.13
       */
      protected Get(java.lang.String name) {
        super(FactCheckTools.this, "GET", REST_PATH, null, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.class);
        this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
              "Parameter name must conform to the pattern " +
              "^pages/[^/]+$");
        }
      }

      @Override
      public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
        return super.executeUsingHead();
      }

      @Override
      public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
        return super.buildHttpRequestUsingHead();
      }

      @Override
      public Get set$Xgafv(java.lang.String $Xgafv) {
        return (Get) super.set$Xgafv($Xgafv);
      }

      @Override
      public Get setAccessToken(java.lang.String accessToken) {
        return (Get) super.setAccessToken(accessToken);
      }

      @Override
      public Get setAlt(java.lang.String alt) {
        return (Get) super.setAlt(alt);
      }

      @Override
      public Get setCallback(java.lang.String callback) {
        return (Get) super.setCallback(callback);
      }

      @Override
      public Get setFields(java.lang.String fields) {
        return (Get) super.setFields(fields);
      }

      @Override
      public Get setKey(java.lang.String key) {
        return (Get) super.setKey(key);
      }

      @Override
      public Get setOauthToken(java.lang.String oauthToken) {
        return (Get) super.setOauthToken(oauthToken);
      }

      @Override
      public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Get) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Get setQuotaUser(java.lang.String quotaUser) {
        return (Get) super.setQuotaUser(quotaUser);
      }

      @Override
      public Get setUploadType(java.lang.String uploadType) {
        return (Get) super.setUploadType(uploadType);
      }

      @Override
      public Get setUploadProtocol(java.lang.String uploadProtocol) {
        return (Get) super.setUploadProtocol(uploadProtocol);
      }

      /** The name of the resource to get, in the form of `pages/{page_id}`. */
      @com.google.api.client.util.Key
      private java.lang.String name;

      /** The name of the resource to get, in the form of `pages/{page_id}`.
       */
      public java.lang.String getName() {
        return name;
      }

      /** The name of the resource to get, in the form of `pages/{page_id}`. */
      public Get setName(java.lang.String name) {
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
              "Parameter name must conform to the pattern " +
              "^pages/[^/]+$");
        }
        this.name = name;
        return this;
      }

      @Override
      public Get set(String parameterName, Object value) {
        return (Get) super.set(parameterName, value);
      }
    }
    /**
     * List the `ClaimReview` markup pages for a specific URL or for an organization.
     *
     * Create a request for the method "pages.list".
     *
     * This request holds the parameters needed by the factchecktools server.  After setting any
     * optional parameters, call the {@link List#execute()} method to invoke the remote operation.
     *
     * @return the request
     */
    public List list() throws java.io.IOException {
      List result = new List();
      initialize(result);
      return result;
    }

    public class List extends FactCheckToolsRequest<com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse> {

      private static final String REST_PATH = "v1alpha1/pages";

      /**
       * List the `ClaimReview` markup pages for a specific URL or for an organization.
       *
       * Create a request for the method "pages.list".
       *
       * This request holds the parameters needed by the the factchecktools server.  After setting any
       * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

       * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
       * must be called to initialize this instance immediately after invoking the constructor.

       *
       * @since 1.13
       */
      protected List() {
        super(FactCheckTools.this, "GET", REST_PATH, null, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse.class);
      }

      @Override
      public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
        return super.executeUsingHead();
      }

      @Override
      public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
        return super.buildHttpRequestUsingHead();
      }

      @Override
      public List set$Xgafv(java.lang.String $Xgafv) {
        return (List) super.set$Xgafv($Xgafv);
      }

      @Override
      public List setAccessToken(java.lang.String accessToken) {
        return (List) super.setAccessToken(accessToken);
      }

      @Override
      public List setAlt(java.lang.String alt) {
        return (List) super.setAlt(alt);
      }

      @Override
      public List setCallback(java.lang.String callback) {
        return (List) super.setCallback(callback);
      }

      @Override
      public List setFields(java.lang.String fields) {
        return (List) super.setFields(fields);
      }

      @Override
      public List setKey(java.lang.String key) {
        return (List) super.setKey(key);
      }

      @Override
      public List setOauthToken(java.lang.String oauthToken) {
        return (List) super.setOauthToken(oauthToken);
      }

      @Override
      public List setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (List) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public List setQuotaUser(java.lang.String quotaUser) {
        return (List) super.setQuotaUser(quotaUser);
      }

      @Override
      public List setUploadType(java.lang.String uploadType) {
        return (List) super.setUploadType(uploadType);
      }

      @Override
      public List setUploadProtocol(java.lang.String uploadProtocol) {
        return (List) super.setUploadProtocol(uploadProtocol);
      }

      /**
       * An integer that specifies the current offset (that is, starting result location) in search
       * results. This field is only considered if `page_token` is unset, and if the request is not
       * for a specific URL. For example, 0 means to return results starting from the first matching
       * result, and 10 means to return from the 11th result.
       */
      @com.google.api.client.util.Key
      private java.lang.Integer offset;

      /** An integer that specifies the current offset (that is, starting result location) in search results.
     This field is only considered if `page_token` is unset, and if the request is not for a specific
     URL. For example, 0 means to return results starting from the first matching result, and 10 means
     to return from the 11th result.
       */
      public java.lang.Integer getOffset() {
        return offset;
      }

      /**
       * An integer that specifies the current offset (that is, starting result location) in search
       * results. This field is only considered if `page_token` is unset, and if the request is not
       * for a specific URL. For example, 0 means to return results starting from the first matching
       * result, and 10 means to return from the 11th result.
       */
      public List setOffset(java.lang.Integer offset) {
        this.offset = offset;
        return this;
      }

      /**
       * The organization for which we want to fetch markups for. For instance, "site.com". Cannot
       * be specified along with an URL.
       */
      @com.google.api.client.util.Key
      private java.lang.String organization;

      /** The organization for which we want to fetch markups for. For instance, "site.com". Cannot be
     specified along with an URL.
       */
      public java.lang.String getOrganization() {
        return organization;
      }

      /**
       * The organization for which we want to fetch markups for. For instance, "site.com". Cannot
       * be specified along with an URL.
       */
      public List setOrganization(java.lang.String organization) {
        this.organization = organization;
        return this;
      }

      /**
       * The pagination size. We will return up to that many results. Defaults to 10 if not set. Has
       * no effect if a URL is requested.
       */
      @com.google.api.client.util.Key
      private java.lang.Integer pageSize;

      /** The pagination size. We will return up to that many results. Defaults to 10 if not set. Has no
     effect if a URL is requested.
       */
      public java.lang.Integer getPageSize() {
        return pageSize;
      }

      /**
       * The pagination size. We will return up to that many results. Defaults to 10 if not set. Has
       * no effect if a URL is requested.
       */
      public List setPageSize(java.lang.Integer pageSize) {
        this.pageSize = pageSize;
        return this;
      }

      /**
       * The pagination token. You may provide the `next_page_token` returned from a previous List
       * request, if any, in order to get the next page. All other fields must have the same values
       * as in the previous request.
       */
      @com.google.api.client.util.Key
      private java.lang.String pageToken;

      /** The pagination token. You may provide the `next_page_token` returned from a previous List request,
     if any, in order to get the next page. All other fields must have the same values as in the
     previous request.
       */
      public java.lang.String getPageToken() {
        return pageToken;
      }

      /**
       * The pagination token. You may provide the `next_page_token` returned from a previous List
       * request, if any, in order to get the next page. All other fields must have the same values
       * as in the previous request.
       */
      public List setPageToken(java.lang.String pageToken) {
        this.pageToken = pageToken;
        return this;
      }

      /**
       * The URL from which to get `ClaimReview` markup. There will be at most one result. If markup
       * is associated with a more canonical version of the URL provided, we will return that URL
       * instead. Cannot be specified along with an organization.
       */
      @com.google.api.client.util.Key
      private java.lang.String url;

      /** The URL from which to get `ClaimReview` markup. There will be at most one result. If markup is
     associated with a more canonical version of the URL provided, we will return that URL instead.
     Cannot be specified along with an organization.
       */
      public java.lang.String getUrl() {
        return url;
      }

      /**
       * The URL from which to get `ClaimReview` markup. There will be at most one result. If markup
       * is associated with a more canonical version of the URL provided, we will return that URL
       * instead. Cannot be specified along with an organization.
       */
      public List setUrl(java.lang.String url) {
        this.url = url;
        return this;
      }

      @Override
      public List set(String parameterName, Object value) {
        return (List) super.set(parameterName, value);
      }
    }
    /**
     * Update for all `ClaimReview` markup on a page
     *
     * Note that this is a full update. To retain the existing `ClaimReview` markup on a page, first
     * perform a Get operation, then modify the returned markup, and finally call Update with the entire
     * `ClaimReview` markup as the body.
     *
     * Create a request for the method "pages.update".
     *
     * This request holds the parameters needed by the factchecktools server.  After setting any
     * optional parameters, call the {@link Update#execute()} method to invoke the remote operation.
     *
     * @param name The name of this `ClaimReview` markup page resource, in the form of
    `pages/{page_id}`. Except for
     *        update requests, this field is output-only
    and should not be set by the user.
     * @param content the {@link com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage}
     * @return the request
     */
    public Update update(java.lang.String name, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage content) throws java.io.IOException {
      Update result = new Update(name, content);
      initialize(result);
      return result;
    }

    public class Update extends FactCheckToolsRequest<com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage> {

      private static final String REST_PATH = "v1alpha1/{+name}";

      private final java.util.regex.Pattern NAME_PATTERN =
          java.util.regex.Pattern.compile("^pages/[^/]+$");

      /**
       * Update for all `ClaimReview` markup on a page
       *
       * Note that this is a full update. To retain the existing `ClaimReview` markup on a page, first
       * perform a Get operation, then modify the returned markup, and finally call Update with the
       * entire `ClaimReview` markup as the body.
       *
       * Create a request for the method "pages.update".
       *
       * This request holds the parameters needed by the the factchecktools server.  After setting any
       * optional parameters, call the {@link Update#execute()} method to invoke the remote operation.
       *
 {@link
       * Update#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
       * be called to initialize this instance immediately after invoking the constructor.

       *
       * @param name The name of this `ClaimReview` markup page resource, in the form of
    `pages/{page_id}`. Except for
     *        update requests, this field is output-only
    and should not be set by the user.
       * @param content the {@link com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage}
       * @since 1.13
       */
      protected Update(java.lang.String name, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage content) {
        super(FactCheckTools.this, "PUT", REST_PATH, content, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.class);
        this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
              "Parameter name must conform to the pattern " +
              "^pages/[^/]+$");
        }
      }

      @Override
      public Update set$Xgafv(java.lang.String $Xgafv) {
        return (Update) super.set$Xgafv($Xgafv);
      }

      @Override
      public Update setAccessToken(java.lang.String accessToken) {
        return (Update) super.setAccessToken(accessToken);
      }

      @Override
      public Update setAlt(java.lang.String alt) {
        return (Update) super.setAlt(alt);
      }

      @Override
      public Update setCallback(java.lang.String callback) {
        return (Update) super.setCallback(callback);
      }

      @Override
      public Update setFields(java.lang.String fields) {
        return (Update) super.setFields(fields);
      }

      @Override
      public Update setKey(java.lang.String key) {
        return (Update) super.setKey(key);
      }

      @Override
      public Update setOauthToken(java.lang.String oauthToken) {
        return (Update) super.setOauthToken(oauthToken);
      }

      @Override
      public Update setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Update) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Update setQuotaUser(java.lang.String quotaUser) {
        return (Update) super.setQuotaUser(quotaUser);
      }

      @Override
      public Update setUploadType(java.lang.String uploadType) {
        return (Update) super.setUploadType(uploadType);
      }

      @Override
      public Update setUploadProtocol(java.lang.String uploadProtocol) {
        return (Update) super.setUploadProtocol(uploadProtocol);
      }

      /**
       * The name of this `ClaimReview` markup page resource, in the form of `pages/{page_id}`.
       * Except for update requests, this field is output-only and should not be set by the user.
       */
      @com.google.api.client.util.Key
      private java.lang.String name;

      /** The name of this `ClaimReview` markup page resource, in the form of `pages/{page_id}`. Except for
     update requests, this field is output-only and should not be set by the user.
       */
      public java.lang.String getName() {
        return name;
      }

      /**
       * The name of this `ClaimReview` markup page resource, in the form of `pages/{page_id}`.
       * Except for update requests, this field is output-only and should not be set by the user.
       */
      public Update setName(java.lang.String name) {
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
              "Parameter name must conform to the pattern " +
              "^pages/[^/]+$");
        }
        this.name = name;
        return this;
      }

      @Override
      public Update set(String parameterName, Object value) {
        return (Update) super.set(parameterName, value);
      }
    }

  }

  /**
   * Builder for {@link FactCheckTools}.
   *
   *

   * Implementation is not thread-safe.
   *

   *
   * @since 1.3.0
   */
  public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {

    /**
     * Returns an instance of a new builder.
     *
     * @param transport HTTP transport, which should normally be:
     *

     *
Google App Engine:
     *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}

     *
Android: {@code newCompatibleTransport} from
     *        {@code com.google.api.client.extensions.android.http.AndroidHttp}

     *
Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
     *

     *

     * @param jsonFactory JSON factory, which may be:
     *

     *
Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}

     *
Google GSON: {@code com.google.api.client.json.gson.GsonFactory}

     *
Android Honeycomb or higher:
     *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}

     *

     * @param httpRequestInitializer HTTP request initializer or {@code null} for none
     * @since 1.7
     */
    public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
        com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      super(
          transport,
          jsonFactory,
          DEFAULT_ROOT_URL,
          DEFAULT_SERVICE_PATH,
          httpRequestInitializer,
          false);
      setBatchPath(DEFAULT_BATCH_PATH);
    }

    /** Builds a new instance of {@link FactCheckTools}. */
    @Override
    public FactCheckTools build() {
      return new FactCheckTools(this);
    }

    @Override
    public Builder setRootUrl(String rootUrl) {
      return (Builder) super.setRootUrl(rootUrl);
    }

    @Override
    public Builder setServicePath(String servicePath) {
      return (Builder) super.setServicePath(servicePath);
    }

    @Override
    public Builder setBatchPath(String batchPath) {
      return (Builder) super.setBatchPath(batchPath);
    }

    @Override
    public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
    }

    @Override
    public Builder setApplicationName(String applicationName) {
      return (Builder) super.setApplicationName(applicationName);
    }

    @Override
    public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
      return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
    }

    @Override
    public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
      return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
    }

    @Override
    public Builder setSuppressAllChecks(boolean suppressAllChecks) {
      return (Builder) super.setSuppressAllChecks(suppressAllChecks);
    }

    /**
     * Set the {@link FactCheckToolsRequestInitializer}.
     *
     * @since 1.12
     */
    public Builder setFactCheckToolsRequestInitializer(
        FactCheckToolsRequestInitializer factchecktoolsRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(factchecktoolsRequestInitializer);
    }

    @Override
    public Builder setGoogleClientRequestInitializer(
        com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
    }
  }
}


text:
    var yf1 = 0;
    var pyf1 = 0;
    var fixj = 0;
    var pfixj = 0;
    var ci = 0;
    var tetr = 0;
    var a = 0;
    var b = 0;
    var c = 0;
    var promoter1 = 1;
    var promoter2 = 0;
    var promoterA = 1;
    var promoterB = 0;
    var promoterC = 0;
    var rbs1 = 1;
    var rbs2 = 0.75;
    var dePhosCoeff1 = 0.5;
    var dePhosCoeff2 = 0.5;
    var phosp = 1;
    var blue_intensity = 0;
    var red_intensity = 0;  // for the intensity switch
    var degCoeffYF1 = 1;
    var degCoeffFixJ = 1;
    var degCoeffCI = 1;
    var degCoeffTetR = 1;
    var degCoeffA = 0.5;
    var degCoeffB = 0.5;
    var degCoeffC = 0.5;
    var timeStep = 0.1;
    var iterations = 600;
    var data = {"YF1":[yf1],
                "PYF1":[pyf1],
                "FixJ":[fixj],
                "PFixJ":[pfixj],
                "CI":[ci],
                "TetR":[tetr],
                "A":[a],
                "B":[b],
                "C":[c]
            }
    var timesteps = [0]; // ??
    //var visualization = Visualization(self) // ??
    //var visualization.start() // ??

function getAmount(proteinName){
    return data[proteinName][data[proteinName].length -1];
}

function derivativeYF1(currentConcentration){
    return promoter1 * rbs1 + dePhosCoeff1 * getAmount('PYF1') - (degCoeffYF1 + (1 - blue_intensity)) * currentConcentration;
}

function derivativePYF1(currentConcentration){
    return (1 - blue_intensity) * getAmount('YF1') - (dePhosCoeff1 + degCoeffYF1) * currentConcentration;
}

function derivativeFixJ(currentConcentration){
    return promoter1 * rbs1 + dePhosCoeff2 * getAmount('PFixJ') - (phosp * getAmount('PYF1') + degCoeffFixJ) * currentConcentration;
}

function derivativePFixJ(currentConcentration){
    return phosp * getAmount('FixJ') * getAmount('PYF1') - (dePhosCoeff2 + degCoeffFixJ) * currentConcentration;
}

function derivativeCI(currentConcentration){
    return promoter2 * rbs1 - degCoeffCI * currentConcentration;
}

function derivativeTetR(currentConcentration){
    return (promoterA + promoterB) * rbs2 - degCoeffTetR * currentConcentration;
}

function derivativeA(currentConcentration){
    return promoterA * rbs1 - degCoeffA * currentConcentration;
}

function derivativeB(currentConcentration){
    return promoterB * rbs1 - degCoeffB * currentConcentration;
}

function derivativeC(currentConcentration){
    return promoterC * rbs1 - degCoeffC * currentConcentration;
}

function derivativeSelect(proteinName, currentConcentration){
    //Select appropriate derivative
    if (proteinName == 'YF1'){
        return derivativeYF1(currentConcentration);
    }
    else if (proteinName == 'PYF1'){
        return derivativePYF1(currentConcentration);
    }
    else if (proteinName == 'FixJ'){
        return derivativeFixJ(currentConcentration);
    }
    else if (proteinName == 'PFixJ'){
        return derivativePFixJ(currentConcentration);
    }
    else if (proteinName == 'CI'){
        return derivativeCI(currentConcentration);
    }
    else if (proteinName == 'TetR'){
        return derivativeTetR(currentConcentration);
    }
    else if (proteinName == 'A'){
        return derivativeA(currentConcentration);
    }
    else if (proteinName == 'B'){
        return derivativeB(currentConcentration);
    }
    else if (proteinName == 'C'){
        return derivativeC(currentConcentration);
    }
}

function promoterUpdate(){
    promoter2 = 7 * getAmount('PFixJ');
    promoterA = (1 - red_intensity) * (1 - getAmount('CI'));
    if (getAmount('CI') < 1){
        promoterB = (1 - red_intensity) * (getAmount('CI'));
    }
    else{
        promoterB = (1 - red_intensity) * (1 - 2.5 * (getAmount('CI') - 1));
    }
    promoterC = (1 - red_intensity) * (1 - (1.75 / 0.75) * getAmount('TetR'));
}

function oneStep(i){
    var keyList = Object.keys(data);

    for(var j = 0; j < keyList.length;j++){
        x = getAmount(keyList[j]);
        coeff1 = derivativeSelect(keyList[j], x);
        coeff2 = derivativeSelect(
            keyList[j], (x + (coeff1) * timeStep / 2));
        coeff3 = derivativeSelect(
            keyList[j], (x + (coeff2) * timeStep / 2));
        coeff4 = derivativeSelect(
            keyList[j], (x + (coeff3) * timeStep));
        x = x + (timeStep / 6) * (coeff1 + 2 * coeff2 + 2 * coeff3 + coeff4);
        if(x > 0){
            data[(keyList[j])].push(x);
        }
        else{
            data[(keyList[j])].push(0);
        }
    }
    timesteps.push(i + 1);
    promoterUpdate();
    var R = 200 + (getAmount('A') * 27.5) - (getAmount('B') * 45) - (getAmount('C') * 45);
    var G = 185 + (getAmount('B') * 35) - (getAmount('A') * 40) - (getAmount('C') * 40);
    var B = 125 + (getAmount('C') * 65) - (getAmount('B') * 25) - (getAmount('C') * 25);
    // A = red, B = green, C = blue. They reduce the others to make the colors more vivid.
    // The base values for each color are for a nice E.Coli light brown.
    setColonyColor("RGB(" + R  + ","  + G + "," + B + ")");
}

function run(){
    //Runge-Kutta computation for protein concentrations
    var i = 0;
    setInterval(function() {
        var light = getLightIntensities();
        blue_intensity = light.blue/100;
        red_intensity = 1 - light.red/100;
        //console.log(blue_intensity);
        //console.log(red_intensity);
        i++;
        oneStep(i);
    }, 100)
}

run();


text:
namespace rocksdb {

BlockBasedTableFactory::BlockBasedTableFactory(
    const BlockBasedTableOptions& _table_options)
    : table_options_(_table_options) {
  if (table_options_.flush_block_policy_factory == nullptr) {
    table_options_.flush_block_policy_factory.reset(
        new FlushBlockBySizePolicyFactory());
  }
  if (table_options_.no_block_cache) {
    table_options_.block_cache.reset();
  } else if (table_options_.block_cache == nullptr) {
    table_options_.block_cache = NewLRUCache(8 << 20);
  }
  if (table_options_.block_size_deviation < 0 ||
      table_options_.block_size_deviation > 100) {
    table_options_.block_size_deviation = 0;
  }
  if (table_options_.block_restart_interval < 1) {
    table_options_.block_restart_interval = 1;
  }
  if (table_options_.index_block_restart_interval < 1) {
    table_options_.index_block_restart_interval = 1;
  }
}

Status BlockBasedTableFactory::NewTableReader(
    const TableReaderOptions& table_reader_options,
    unique_ptr<RandomAccessFileReader>&& file, uint64_t file_size,
    unique_ptr<TableReader>* table_reader,
    bool prefetch_index_and_filter_in_cache) const {
  return BlockBasedTable::Open(
      table_reader_options.ioptions, table_reader_options.env_options,
      table_options_, table_reader_options.internal_comparator, std::move(file),
      file_size, table_reader, prefetch_index_and_filter_in_cache,
      table_reader_options.skip_filters, table_reader_options.level);
}

TableBuilder* BlockBasedTableFactory::NewTableBuilder(
    const TableBuilderOptions& table_builder_options, uint32_t column_family_id,
    WritableFileWriter* file) const {
  auto table_builder = new BlockBasedTableBuilder(
      table_builder_options.ioptions, table_options_,
      table_builder_options.internal_comparator,
      table_builder_options.int_tbl_prop_collector_factories, column_family_id,
      file, table_builder_options.compression_type,
      table_builder_options.compression_opts,
      table_builder_options.compression_dict,
      table_builder_options.skip_filters,
      table_builder_options.column_family_name);

  return table_builder;
}

Status BlockBasedTableFactory::SanitizeOptions(
    const DBOptions& db_opts,
    const ColumnFamilyOptions& cf_opts) const {
  if (table_options_.index_type == BlockBasedTableOptions::kHashSearch &&
      cf_opts.prefix_extractor == nullptr) {
    return Status::InvalidArgument("Hash index is specified for block-based "
        "table, but prefix_extractor is not given");
  }
  if (table_options_.cache_index_and_filter_blocks &&
      table_options_.no_block_cache) {
    return Status::InvalidArgument("Enable cache_index_and_filter_blocks, "
        ", but block cache is disabled");
  }
  if (table_options_.pin_l0_filter_and_index_blocks_in_cache &&
      table_options_.no_block_cache) {
    return Status::InvalidArgument(
        "Enable pin_l0_filter_and_index_blocks_in_cache, "
        ", but block cache is disabled");
  }
  if (!BlockBasedTableSupportedVersion(table_options_.format_version)) {
    return Status::InvalidArgument(
        "Unsupported BlockBasedTable format_version. Please check "
        "include/rocksdb/table.h for more info");
  }
  return Status::OK();
}

std::string BlockBasedTableFactory::GetPrintableTableOptions() const {
  std::string ret;
  ret.reserve(20000);
  const int kBufferSize = 200;
  char buffer[kBufferSize];

  snprintf(buffer, kBufferSize, "  flush_block_policy_factory: %s (%p)\n",
           table_options_.flush_block_policy_factory->Name(),
           static_cast<void*>(table_options_.flush_block_policy_factory.get()));
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  cache_index_and_filter_blocks: %d\n",
           table_options_.cache_index_and_filter_blocks);
  ret.append(buffer);
  snprintf(buffer, kBufferSize,
           "  cache_index_and_filter_blocks_with_high_priority: %d\n",
           table_options_.cache_index_and_filter_blocks_with_high_priority);
  ret.append(buffer);
  snprintf(buffer, kBufferSize,
           "  pin_l0_filter_and_index_blocks_in_cache: %d\n",
           table_options_.pin_l0_filter_and_index_blocks_in_cache);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  index_type: %d\n",
           table_options_.index_type);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  hash_index_allow_collision: %d\n",
           table_options_.hash_index_allow_collision);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  checksum: %d\n",
           table_options_.checksum);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  no_block_cache: %d\n",
           table_options_.no_block_cache);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  block_cache: %p\n",
           static_cast<void*>(table_options_.block_cache.get()));
  ret.append(buffer);
  if (table_options_.block_cache) {
    const char* block_cache_name = table_options_.block_cache->Name();
    if (block_cache_name != nullptr) {
      snprintf(buffer, kBufferSize, "  block_cache_name: %s\n",
               block_cache_name);
      ret.append(buffer);
    }
    ret.append("  block_cache_options:\n");
    ret.append(table_options_.block_cache->GetPrintableOptions());
  }
  snprintf(buffer, kBufferSize, "  block_cache_compressed: %p\n",
           static_cast<void*>(table_options_.block_cache_compressed.get()));
  ret.append(buffer);
  if (table_options_.block_cache_compressed) {
    const char* block_cache_compressed_name =
        table_options_.block_cache_compressed->Name();
    if (block_cache_compressed_name != nullptr) {
      snprintf(buffer, kBufferSize, "  block_cache_name: %s\n",
               block_cache_compressed_name);
      ret.append(buffer);
    }
    ret.append("  block_cache_compressed_options:\n");
    ret.append(table_options_.block_cache_compressed->GetPrintableOptions());
  }
  snprintf(buffer, kBufferSize, "  persistent_cache: %p\n",
           static_cast<void*>(table_options_.persistent_cache.get()));
  ret.append(buffer);
  if (table_options_.persistent_cache) {
    snprintf(buffer, kBufferSize, "  persistent_cache_options:\n");
    ret.append(buffer);
    ret.append(table_options_.persistent_cache->GetPrintableOptions());
  }
  snprintf(buffer, kBufferSize, "  block_size: %" ROCKSDB_PRIszt "\n",
           table_options_.block_size);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  block_size_deviation: %d\n",
           table_options_.block_size_deviation);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  block_restart_interval: %d\n",
           table_options_.block_restart_interval);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  index_block_restart_interval: %d\n",
           table_options_.index_block_restart_interval);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  filter_policy: %s\n",
           table_options_.filter_policy == nullptr ?
             "nullptr" : table_options_.filter_policy->Name());
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  whole_key_filtering: %d\n",
           table_options_.whole_key_filtering);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  skip_table_builder_flush: %d\n",
           table_options_.skip_table_builder_flush);
  ret.append(buffer);
  snprintf(buffer, kBufferSize, "  format_version: %d\n",
           table_options_.format_version);
  ret.append(buffer);
  return ret;
}

const BlockBasedTableOptions& BlockBasedTableFactory::table_options() const {
  return table_options_;
}

TableFactory* NewBlockBasedTableFactory(
    const BlockBasedTableOptions& _table_options) {
  return new BlockBasedTableFactory(_table_options);
}

const std::string BlockBasedTablePropertyNames::kIndexType =
    "rocksdb.block.based.table.index.type";
const std::string BlockBasedTablePropertyNames::kWholeKeyFiltering =
    "rocksdb.block.based.table.whole.key.filtering";
const std::string BlockBasedTablePropertyNames::kPrefixFiltering =
    "rocksdb.block.based.table.prefix.filtering";
const std::string kHashIndexPrefixesBlock = "rocksdb.hashindex.prefixes";
const std::string kHashIndexPrefixesMetadataBlock =
    "rocksdb.hashindex.metadata";
const std::string kPropTrue = "1";
const std::string kPropFalse = "0";

}  // namespace rocksdb


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:custom="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivityFragment"
    android:background="@color/brand_col_1">

    <TextView
        android:id="@+id/pushAlertsMessage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text=""
        android:visibility="gone" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:id="@+id/heatStatusPanel"
        android:clickable="true">

        <TextView android:text="@string/current_status" android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/white"
            android:id="@+id/textView"
            android:textAppearance="?android:textAppearanceLarge"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true" />

        <net.jeremycasey.hamiltonheatalert.app.ui.MeterView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/meter"
            android:contentDescription="@string/advisory_status_checking"
            custom:stage="-1"
            android:layout_below="@+id/textView"
            android:layout_marginTop="@dimen/component_vertical_spacing"
            android:layout_centerHorizontal="true"
            />

        <TextView android:text="" android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:id="@+id/description"
            android:textColor="@color/white"
            android:textAppearance="?android:textAppearanceLarge"
            android:gravity="center_horizontal"
            android:layout_centerHorizontal="true"
            android:layout_below="@+id/meter"
            android:layout_marginTop="8dp"/>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:text=""
            android:id="@+id/lastChecked"
            android:layout_below="@+id/description"
            android:gravity="center_horizontal"
            android:layout_marginTop="@dimen/component_vertical_spacing"
            android:layout_centerHorizontal="true"
            android:alpha="0.6"
            android:paddingBottom="@dimen/component_vertical_spacing"/>

    </RelativeLayout>

    <CheckBox
        android:id="@+id/pushAlertsCheckBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/receive_push_notifications_checkbox"
        android:textColor="@color/white"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true" />
</RelativeLayout>


text:
using System;
using System.Runtime.InteropServices;

namespace SharpVk.Interop.Multivendor
{
    /// <summary>
    ///
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public unsafe partial struct RenderPassSampleLocationsBeginInfo
    {
        /// <summary>
        /// The type of this structure.
        /// </summary>
        public SharpVk.StructureType SType;

        /// <summary>
        /// Null or an extension-specific structure.
        /// </summary>
        public void* Next;

        /// <summary>
        ///
        /// </summary>
        public uint AttachmentInitialSampleLocationsCount;

        /// <summary>
        ///
        /// </summary>
        public SharpVk.Interop.Multivendor.AttachmentSampleLocations* AttachmentInitialSampleLocations;

        /// <summary>
        ///
        /// </summary>
        public uint PostSubpassSampleLocationsCount;

        /// <summary>
        ///
        /// </summary>
        public SharpVk.Interop.Multivendor.SubpassSampleLocations* PostSubpassSampleLocations;
    }
}


text:
import functools

import six
import inflection

def convert_value(value, converter=None):
    return converter(value) if converter else value

def convert_dict(data, key_converter=None, value_converter=None):
    return {
        convert_value(key, key_converter): convert_value(value, value_converter)
        for key, value in six.iteritems(data)
    }

camelize = functools.partial(inflection.camelize, uppercase_first_letter=False)
serialize_dict = functools.partial(convert_dict, key_converter=camelize)


text:
package com.omottec.demoapp.view.recycler;

import android.os.Bundle;
import android.os.SystemClock;
import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;

import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.omottec.demoapp.R;
import com.omottec.demoapp.app.MyApplication;
import com.omottec.demoapp.fragment.BaseFragment;
import com.omottec.demoapp.utils.TouchUtils;
import com.omottec.demoapp.utils.UiUtils;

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

/**
 * Created by qinbingbing on 22/03/2017.
 */

public class PtrRecyclerViewFragment extends BaseFragment {
    public static final String TAG = "PtrRecyclerViewFragment";
    private PtrRecyclerView mPtrRecyclerView;
    private RecyclerView mRecyclerView;
    private List<String> mData = new ArrayList<>();
    private SimpleRecyclerAdapter mSimpleAdapter;
    private PtrRecyclerAdapter mPtrAdapter;
    private int mHeaderCount;
    private int mFooterCount;

    @Override
    protected View createContentView() {
        View view = View.inflate(mActivity, R.layout.f_ptr_recycler_view, null);
        mPtrRecyclerView = (PtrRecyclerView) view.findViewById(R.id.ptr_recycler_view);
        mPtrRecyclerView.setMode(PullToRefreshBase.Mode.BOTH);
        mRecyclerView = mPtrRecyclerView.getRefreshableView();
        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        List<String> data = new ArrayList<>();
        for (int i = 0; i < 200; i++)
            data.add("item " + i);
//        mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
        mRecyclerView.setLayoutManager(new GridLayoutManager(mActivity, 3));
        mSimpleAdapter = new SimpleRecyclerAdapter(data);
        mPtrAdapter = new PtrRecyclerAdapter(mPtrRecyclerView, mSimpleAdapter, false, true);
        mRecyclerView.setAdapter(mPtrAdapter);
        /*GridLayoutManager glm = new GridLayoutManager(mActivity, 2);
        glm.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
            @Override
            public int getSpanSize(int position) {
                if (mPtrAdapter.showHeader() && position == 0) return 2;
                if (mPtrAdapter.showFooter() && position == mPtrAdapter.getItemCount()-1) return 2;
                return 1;
            }
        });
        mRecyclerView.setLayoutManager(glm);*/
        /*mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
            @Override
            public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
                Log.d(TAG, "onScrollStateChanged " + TouchUtils.getRecyclerScrollState(newState)
                        + ", isReadyForPullStart:" + mPtrRecyclerView.isReadyForPullStart());
            }

            @Override
            public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
                Log.d(TAG, "onScrolled isReadyForPullStart:" + mPtrRecyclerView.isReadyForPullStart());
            }
        });*/

//        mPtrRecyclerView.setMode(PullToRefreshBase.Mode.PULL_FROM_START);
        /*mPtrRecyclerView._setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<RecyclerView>() {
            @Override
            public void onRefresh(PullToRefreshBase<RecyclerView> refreshView) {

            }
        });*/

        mPtrRecyclerView._setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<RecyclerView>() {
            @Override
            public void onPullDownToRefresh(PullToRefreshBase<RecyclerView> refreshView) {
                Log.d(TAG, "onPullDownToRefresh");
                mPtrAdapter.setShowFooter(false);
                /*List<String> data = new ArrayList<String>();
                for (int i = 0; i < 5; i++)
                    data.add(0, "item add header " + mHeaderCount);
                mHeaderCount++;
                mPtrRecyclerView.onRefreshComplete();
                mSimpleAdapter.addDataAtFirst(data);*/
                List<String> data = new ArrayList<>();
                for (int i = 0; i < 200; i++)
                    data.add("item " + i);
                mPtrRecyclerView.onRefreshComplete();
                mSimpleAdapter.reset(data);
                mFooterCount = 0;
            }

            @Override
            public void onPullUpToRefresh(PullToRefreshBase<RecyclerView> refreshView) {
                Log.d(TAG, "onPullUpToRefresh");
                if (mFooterCount == 30) {
                    mPtrRecyclerView._onRefreshComplete();
                    mPtrAdapter.setShowFooter(true);
                    return;
                }
                List<String> data = new ArrayList<String>();
                for (int i = 0; i < 30; i++)
                    data.add("item add footer " + mFooterCount);
                mFooterCount++;
//                SystemClock.sleep(200 + new Random().nextInt(200));
                mSimpleAdapter.addDataAtLast(data);
                mPtrRecyclerView._onRefreshComplete();
            }
        });
        mPtrRecyclerView.setMode(PullToRefreshBase.Mode.BOTH);
        mPtrAdapter.notifyDataSetChanged();
    }

    @Override
    public void onPause() {
        super.onPause();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }

}


text:
section: cli-commands
title: npm-publish
description: Publish a package
---

# npm-publish(1)

## Publish a package

### Synopsis
```bash
npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]

Publishes '.' if no argument supplied
Sets tag 'latest' if no --tag specified
```

### Description

Publishes a package to the registry so that it can be installed by name. All
files in the package directory are included if no local `.gitignore` or
`.npmignore` file exists. If both files exist and a file is ignored by
`.gitignore` but not by `.npmignore` then it will be included.  See
[`developers`](/using-npm/developers) for full details on what's included in the published package, as well as details on how the package is built.

By default npm will publish to the public registry. This can be overridden by
specifying a different default registry or using a [`scope`](/using-npm/npm-scope) in the name (see [`package.json`](/configuring-npm/package-json)).

* `<folder>`:
  A folder containing a package.json file

* `<tarball>`:
  A url or file path to a gzipped tar archive containing a single folder
  with a package.json file inside.

* `[--tag <tag>]`
  Registers the published package with the given tag, such that `npm install
  <name>@<tag>` will install this version.  By default, `npm publish` updates
  and `npm install` installs the `latest` tag. See [`npm-dist-tag`](npm-dist-tag) for
  details about tags.

* `[--access <public|restricted>]`
  Tells the registry whether this package should be published as public or
  restricted. Only applies to scoped packages, which default to `restricted`.
  If you don't have a paid account, you must publish with `--access public`
  to publish scoped packages.

* `[--otp <otpcode>]`
  If you have two-factor authentication enabled in `auth-and-writes` mode
  then you can provide a code from your authenticator with this. If you
  don't include this and you're running from a TTY then you'll be prompted.

* `[--dry-run]`
  As of `npm@6`, does everything publish would do except actually publishing
  to the registry. Reports the details of what would have been published.

Fails if the package name and version combination already exists in
the specified registry.

Once a package is published with a given name and version, that
specific name and version combination can never be used again, even if
it is removed with [`npm unpublish`](/cli-commands/npm-unpublish).

As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the
tarball will be submitted to the registry during publication. Subsequent
installs will use the strongest supported algorithm to verify downloads.

Similar to `--dry-run` see [`npm pack`](/cli-commands/npm-pack), which figures out the files to be
included and packs them into a tarball to be uploaded to the registry.

### See Also

* [npm registry](/using-npm/registry)
* [npm scope](/using-npm/scope)
* [npm adduser](/cli-commands/adduser)
* [npm owner](/cli-commands/owner)
* [npm deprecate](/cli-commands/deprecate)
* [npm dist-tag](/cli-commands/dist-tag)
* [npm pack](/cli-commands/pack)
* [npm profile](/cli-commands/profile)


text:
<?php
declare(strict_types=1);

namespace Muffin\Webservice;

use Cake\Core\BasePlugin;
use Cake\Core\PluginApplicationInterface;
use Cake\Datasource\FactoryLocator;
use Muffin\Webservice\Model\EndpointLocator;

class Plugin extends BasePlugin
{
    /**
     * Disable routes hook.
     *
     * @var bool
     */
    protected $routesEnabled = false;

    /**
     * Disable middleware hook.
     *
     * @var bool
     */
    protected $middlewareEnabled = false;

    /**
     * Disable console hook.
     *
     * @var bool
     */
    protected $consoleEnabled = false;

    /**
     * @inheritDoc
     */
    public function bootstrap(PluginApplicationInterface $app): void
    {
        FactoryLocator::add('Endpoint', new EndpointLocator());
    }
}


text:
#if DI
using Microsoft.Extensions.Options;
#endif

using System;

namespace JavaScriptViewEngine
{
    /// <summary>
    /// An <see cref="IRenderEngineBuilder"/> that builds a <see cref="IRenderEngine"/>
    /// that uses node.exe
    /// </summary>
    /// <seealso cref="JavaScriptViewEngine.IRenderEngineBuilder" />
    public class NodeRenderEngineBuilder : IRenderEngineBuilder
    {
        private readonly IServiceProvider _serviceProvider;
        private readonly NodeRenderEngineOptions _options;

        public NodeRenderEngineBuilder(
            #if DOTNETCORE
            Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment,
            #endif
            IServiceProvider serviceProvider,
            IOptions<NodeRenderEngineOptions> options)
        {
            _serviceProvider = serviceProvider;
            _options = options.Value;
            if (string.IsNullOrEmpty(_options.ProjectDirectory))
            {
                #if DOTNETCORE
                _options.ProjectDirectory = hostingEnvironment.WebRootPath;
                #else
                _options.ProjectDirectory = System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data");
                #endif
            }
        }

        public IRenderEngine Build()
        {
            return new NodeRenderEngine(_serviceProvider, _options);
        }
    }
}