text:
class java::lang::InternalError : public ::java::lang::VirtualMachineError
{

public:
  InternalError();
  InternalError(::java::lang::String *);
private:
  static const jlong serialVersionUID = -9062593416125562365LL;
public:
  static ::java::lang::Class class$;
};

#endif // __java_lang_InternalError__


text:
require File.dirname(__FILE__) + '/../test_helper'

class TagTest < Test::Unit::TestCase
  should_have_many :taggings, :dependent => :destroy
  should_have_many :posts

  should_ensure_length_at_least :name, 2

  should_protect_attributes :secret

  should_fail do
    should_protect_attributes :name
  end
end

redpajama_set_name: RedPajamaGithub


text:
/*
 * Created by SharpDevelop.
 * User: lextm
 * Date: 2010/12/11
 * Time: 11:04
 *
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using NUnit.Framework;

namespace Lextm.SharpSnmpLib.Objects.Tests
{
    [TestFixture]
    [Category("Default")]
    public class SysORTableTestFixture
    {
        [Test]
        public void Test()
        {
            var table = new SysORTable();
            Assert.AreEqual(null, table.MatchGet(new ObjectIdentifier("1.3.6")));
            var id = new ObjectIdentifier("1.3.6.1.2.1.1.9.1.1.1");
            Assert.AreEqual(id, table.MatchGet(id).Variable.Id);
            Assert.AreEqual(new ObjectIdentifier("1.3.6.1.2.1.1.9.1.1.2"), table.MatchGetNext(id).Variable.Id);
        }
    }
}


text:
<?php
/*
 * Vendor: CW
 * addon: SagePay Go - Form protocol
 */

const sagepaygo_form_addon_name 		= 'payment_sagepay_form';
const sagepaygo_form_addon_target 		= 'sagepaygo_form';
const sagepaygo_form_addon_version 	= '0.1';
const sagepaygo_form_addon_partner_id	= '';	//If you are a Sage Pay Partner and wish to flag the transactions with your unique partner id set it here.

if (!empty($addons[sagepaygo_form_addon_name])) {
	cw_include('addons/' . sagepaygo_form_addon_name . '/include/func.php');

	cw_addons_set_controllers(
	    array(
	    	'replace',
	    	'customer/' . sagepaygo_form_addon_target . '.php',
	    	'addons/' . sagepaygo_form_addon_name . '/customer/' . sagepaygo_form_addon_target . '.php'
	    )
	);

	cw_addons_set_hooks(
	    array('post', 'cw_payment_get_methods', 	'cw_payment_sagepaygo_form_get_methods'),
	    array('post', 'cw_payment_run_processor', 'cw_payment_sagepaygo_form_run_processor')
	);
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

       Copyright 2009-2022 the original author or authors.

       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

          https://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.

-->
<!DOCTYPE mapper
    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
    "https://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="org.apache.ibatis.submitted.bringrags.SimpleChildObjectMapper">

    <select id="getSimpleChildObjectById" resultMap="SimpleChildObjectMap">
        SELECT SimpleChildObject.id as sco_id, SimpleObject.id as so_id FROM SimpleChildObject
        LEFT JOIN SimpleObject ON SimpleChildObject.simple_object_id=SimpleObject.id
        WHERE SimpleChildObject.id=#{id}
    </select>

    <resultMap id="SimpleChildObjectMap" type="org.apache.ibatis.submitted.bringrags.SimpleChildObject">
        <constructor>
            <idArg column="sco_id" javaType="String" />
        </constructor>
        <association property="parentSimpleObject" resultMap="SimpleObjectMap" />
    </resultMap>

    <resultMap id="SimpleObjectMap" type="org.apache.ibatis.submitted.bringrags.SimpleObject">
        <constructor>
            <idArg column="so_id" javaType="String" />
        </constructor>
        <collection property="simpleChildObjects" javaType="List" ofType="org.apache.ibatis.submitted.bringrags.SimpleChildObject" resultMap="SimpleChildObjectMap" />
    </resultMap>

</mapper>


text: Aquesta seria la primera secció del document.


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.
 */
package io.trino.sql.planner.optimizations;

import io.trino.Session;
import io.trino.execution.warnings.WarningCollector;
import io.trino.sql.planner.OptimizerStatsRecorder;
import io.trino.sql.planner.PlanNodeIdAllocator;
import io.trino.sql.planner.SymbolAllocator;
import io.trino.sql.planner.TypeProvider;
import io.trino.sql.planner.plan.PlanNode;

import static java.util.Objects.requireNonNull;

public final class StatsRecordingPlanOptimizer
        implements PlanOptimizer
{
    private final OptimizerStatsRecorder stats;
    private final PlanOptimizer delegate;

    public StatsRecordingPlanOptimizer(OptimizerStatsRecorder stats, PlanOptimizer delegate)
    {
        this.stats = requireNonNull(stats, "stats is null");
        this.delegate = requireNonNull(delegate, "delegate is null");
        stats.register(delegate);
    }

    @Override
    public final PlanNode optimize(
            PlanNode plan,
            Session session,
            TypeProvider types,
            SymbolAllocator symbolAllocator,
            PlanNodeIdAllocator idAllocator,
            WarningCollector warningCollector)
    {
        PlanNode result;
        long duration;
        try {
            long start = System.nanoTime();
            result = delegate.optimize(plan, session, types, symbolAllocator, idAllocator, warningCollector);
            duration = System.nanoTime() - start;
        }
        catch (RuntimeException e) {
            stats.recordFailure(delegate);
            throw e;
        }
        stats.record(delegate, duration);
        return result;
    }
}


text:
require 'rails_helper'

describe FileUpload::Create do
  before(:all) do
    FileUpload.directory.files.each { |f| f.destroy }
  end

  let(:uploaded_file) do
    ActionDispatch::Http::UploadedFile.new({
      tempfile: File.open('spec/fixtures/images/avatar.jpg'),
      filename: 'avatar.jpeg',
      type: "image/jpeg"
    })
  end

  let(:uploader) { create(:user)  }

  it "can store a file" do
    upload = FileUpload::Create.run!({
      file: uploaded_file,
      uploadable: uploader,
      uploader: uploader,
      upload_type: :file,
      is_public: false
    })

    uploaded_file.tempfile.rewind
    original_data = uploaded_file.tempfile.read

    expect(upload.read).to eq(original_data)
    expect(upload.uploader).to eq(uploader)
    expect(upload.uploadable).to eq(uploader)

    expect(FileUpload.directory.files.get(upload.file_path).body).to_not eq(original_data)
  end
end


text:
import React from 'react'
import autobind from 'autobind-decorator'
import { reduxForm } from 'redux-form'
import { createTodo, updateTodo, focusTodo } from '../actions'

const fields = [
  'id',
  'title',
  'due_date',
  'color',
  'marked',
]
@autobind
class _TodoInlineForm extends React.Component {

  componentDidMount() {
    this.refs.titleInput.focus();
  }

  _handleSubmit(values) {
    return new Promise((resolve, reject) => {
      if (!values.title) {
        reject({title: 'Please input a title.', _error: "Submit validation failed."});
        return;
      }
      this.props.dispatch(this._submitAction(
        values,
        resolve,
        (e) => { alert(e); reject();}));
    });
  }

  render() {
    const { fields: {id, title, due_date, color, marked}, handleSubmit, submitting } = this.props
    return(
      <form className="todo-inline-form"
        onSubmit={handleSubmit(values => this._handleSubmit(values))}
        onBlur={this._onBlur}
        >
        <div>
          <input
            ref="titleInput"
            className={"new-todo" + (title.error ? " error" : "")}
            placeholder={title.error || "What needs to be done?"}
            disabled={submitting}
            {...title}
          />
        </div>
      </form>
    )
  }
}

@reduxForm({
  form: 'TodoInlineCreateForm',
  fields
})
export class TodoInlineCreateForm extends _TodoInlineForm {
  _submitAction(values, resolve, reject) {
    const { resetForm } = this.props;
    const titleInput = this.refs.titleInput;
    return createTodo({
      data: values,
      resolve: () => { resetForm(); titleInput.focus(); resolve(); },
      reject
    });
  }

  _onBlur() {}
}

@reduxForm({
  form: 'TodoInlineUpdateForm',
  fields
})
@autobind
export class TodoInlineUpdateForm extends _TodoInlineForm {
  _submitAction(values, resolve, reject) {
    const { resetForm, dispatch } = this.props;
    return updateTodo({
      id: values.id,
      data: values,
      resolve: () => { resetForm(); dispatch(focusTodo(null)); resolve(); },
      reject
    });
  }
  _onBlur() {
    const { dispatch } = this.props;
    dispatch(focusTodo(null));
  }
}


text:
package uk.gov.gds.common.model

// TODO: flatten model together. There should not be an ELMS model and a default model
// TODO: Standardise on one type of address. There should not be an Address and a GovUkAddress
// TODO: kill the ERO class, we're not using it

case class OpcsId(value: String)

object OpcsId {

  val opcsIdRegex = "[0-9]{2}[A-Z][A-Z]?".r

  def isValid(value: String) = value.matches(opcsIdRegex.toString())
}

case class Address(lineOne: String = "",
                   lineTwo: String = "",
                   lineThree: String = "",
                   lineFour: String = "",
                   lineFive: String = "",
                   city: String = "",
                   postcode: String = "",
                   county: String = "",
                   uprn: Option[String] = None) {

  def shortString = if (lineOne.length() > 0)
    lineOne + " " + postcode
  else
    ""

  def asString = List(lineOne, lineTwo, lineThree, lineFour, lineFive, city, postcode)
    .filterNot(_.isEmpty).mkString(", ")

  def asShortString = List(lineOne, lineTwo, lineThree, lineFour, lineFive)
    .filterNot(_.isEmpty).reduceLeft(_ + ", " + _)
}


text:
{-# LANGUAGE OverloadedStrings #-}

------------------------------------------------------------------------------
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported by this module.
module Site
  ( app
  ) where

import Application

import Control.Applicative
import Snap.Snaplet
import Snap.Snaplet.Heist.Compiled
import Snap.Util.FileServe
import Heist
import Control.Lens

app :: Example -> SnapletInit App App
app ex = makeSnaplet "tutorial" "Heist tutorial" Nothing $ do
  h <- nestSnaplet "" heist $ heistInit' (examplePath ex) emptyHeistConfig
  addConfig h $ mempty & scCompiledSplices .~ (exampleSplices ex)
  wrapSite (<|> heistServe)
  return $ App h "green"


text:
select top 100 *
from Sales.Orders
where patindex('%[0-9]%', shipaddress) > 1;

-- orders with addresses which with 1
select top 100 *
from Sales.Orders
where charindex('1', shipaddress) = 1;


text:
package ml.combust.bundle.dsl

/** This trait provides easy access to reading/writing attributes
  * to objects that contain an [[Attributes]].
  *
  * @tparam T class type that contains the attribute list
  */
trait HasAttributes[T] {
  /** The attribute list */
  def attributes: Attributes

  /** Get the [[Value]] of an attribute.
    *
    * Throws an error if that attribute does not exist.
    *
    * @param name name of the attribute
    * @return [[Value]] of the attribute
    */
  def value(name: String): Value = attributes(name)

  /** Get the [[Value]] of an attribute as an Option.
    *
    * @param name name of the attribute
    * @return [[Value]] of the attribute as an Option[Value], None if it does not exist
    */
  def getValue(name: String): Option[Value] = attributes.get(name)

  /** Add an attribute to the list.
    *
    * @param name name of the attribute
    * @param value value of the attribute
    * @return a copy of T with the attribute added
    */
  def withValue(name: String, value: Value): T = withAttributes(attributes.withValue(name, value))

  /** Add an optional attribute to the list.
    *
    * @param name name of the attribute
    * @param value optional value
    * @return a copy of T with the attribute optionally added
    */
  def withValue(name: String, value: Option[Value]): T = value.map {
    v => withAttributes(attributes.withValue(name, v))
  }.getOrElse(withAttributes(attributes))

  /** Replace the [[attributes]] with another list.
    *
    * @param attrs attributes to use to replace
    * @return copy of T with [[attributes]] replaced by list arg
    */
  def withAttributes(attrs: Attributes): T
}

/** Companion class for construction and conversion of [[Attributes]] objects.
  */
object Attributes {
  /** Construct an empty [[Attributes]].
    *
    * @return empty [[Attributes]]
    */
  def apply(): Attributes = new Attributes(Map())

  /** Construct an [[Attributes]] from a list of [[(String, Value)]].
    *
    * @param attrs list of [[(String, Value)]]
    * @return [[Attributes]] with all attrs passed in
    */
  def apply(attrs: Seq[(String, Value)]): Attributes = {
    Attributes(attrs.toMap)
  }

  /** Construct an [[Attributes]] from a list of [[(String, Value)]].
    *
    * @param attr1 first [[(String, Value)]] in list
    * @param attrs tail of [[(String, Value)]] list
    * @return [[Attributes]] with attr1 and attrs in the list
    */
  def apply(attr1: (String, Value), attrs: (String, Value) *): Attributes = {
    Attributes(Seq(attr1) ++ attrs)
  }

  /** Create an attribute list from a bundle attribute list.
    *
    * @param attrs bundle attributes
    * @return dsl attribute list
    */
  def fromBundle(attrs: ml.bundle.Attributes): Attributes = {
    val a = attrs.list.map {
      case (key, value) => (key, Value(value))
    }
    Attributes(a)
  }
}

/** Class that holds a map of string to [[ml.combust.bundle.dsl.Value]] objects.
  *
  * Can only have one attribute with a given name at a time.
  *
  * @param lookup map of attribute name to [[ml.combust.bundle.dsl.Value]] object
  */
case class Attributes(lookup: Map[String, Value]) {
  /** Convert to bundle attribute list.
    *
    * @return bundle attribute list
    */
  def asBundle: ml.bundle.Attributes = {
    val attrs = lookup.map {
      case (key, value) => (key, value.value)
    }

    ml.bundle.Attributes(attrs)
  }

  /** Get an attribute.
    *
    * Alias for [[value]]
    *
    * @param name name of the attribute
    * @return the attribute
    */
  def apply(name: String): Value = value(name)

  /** Get a [[Value]] from the list.
    *
    * Throws an error if the attribute doesn't exist.
    *
    * @param name name of the attribute
    * @return the attribute
    */
  def value(name: String): Value = lookup(name)

  /** Get an option of an [[Value]] from the list.
    *
    * @param name name of the attribute
    * @return optional [[Value]] from list
    */
  def get(name: String): Option[Value] = lookup.get(name)

  /** Add an attribute to the list.
    *
    * @param name name of attribute
    * @param value value to add
    * @return copy of [[Attributes]] with attribute added
    */
  def withValue(name: String, value: Value): Attributes = {
    copy(lookup = lookup + (name -> value))
  }
}


text:
package uk.co.buildergenerator;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * A tool to auto generate builders following the Builder pattern for an object
 * graph of JavaBeans.
 *

 * Specify the object graph root class and BuilderGenerator will
 * generate a builder following a consistent pattern for each JavaBean in the
 * entire object graph.
 *
 *
Usage

 * To generate builders using the default builder package and
 * output folder chosen by BuilderGenerator call one of the following static utility methods:
 *

 *
 * BuilderGenerator.generateBuilders(MyObjectGraphRoot.class);

 * BuilderGenerator.generateBuilders("com.example.MyObjectGraphRoot");
 *
 *

 * To generate builders in either a package and/or output folder other than those chosen by BuilderGenerator:
 *

 *
 * BuilderGenerator bg = new BuilderGenerator(MyObjectGraphRoot.class);

 * bg.setBuilderPackage("com.example.mypackage");

 * bg.setOutputDirectory("/my/output/folder");

 * bg.generateBuilders();
 *
 *

 * To ignore properties in a specified class:
 *

 *
 * BuilderGenerator bg = new BuilderGenerator(MyObjectGraphRoot.class);

 * bg.addPropertyToIgnore(MyObjectGraphRoot.class, "thePropertyToIgnore");

 * bg.generateBuilders();
 *
 *

 * To ignore classes in the object graph:
 *

 *
 * BuilderGenerator bg = new BuilderGenerator(MyObjectGraphRoot.class);

 * bg.addClassToIgnore(MyObjectToIgnore.class);

 * bg.generateBuilders();
 *
 *

 * See:

 * {@link #generateBuilders(Class) generateBuilders}
 * {@link #generateBuilders(String) generateBuilders}
 * {@link #setOutputDirectory(String) setOutputDirectory}
 * {@link #setBuilderPackage(String) setBuilderPackage}
 * {@link #setGenerationGap(boolean)}
 * {@link #addPropertyToIgnore(Class, String) addPropertyToIgnore}
 * {@link #addPropertyToIgnore(String, String) addPropertyToIgnore}
 * {@link #addClassToIgnore(Class) addClassToIgnore}
 * {@link #addClassToIgnore(String) addClassToIgnore}
 * {@link #addBuilderSuperClass(Class, String)}
 * {@link #addBuilderSuperClass(Class, Class)}
 *
 *
 * @see www.buildergenerator.co.uk
 * @author uglycustard@buildergenerator.co.uk
 *
 */
public class BuilderGenerator {

	/**
	 * The default output directory where generated builder sources will be
	 * written.
	 *
	 * This is the current directory the Java process is executed from.
	 */
	public static final String DEFAULT_OUTPUT_DIRECTORY = ".";

	/**
	 * Generate builders for an object graph whose graph root is
	 * rootClassName.
	 *

	 * Use this utility method when the default builder package and default
	 * output directory are sufficient.
	 *

	 * See:

	 * {@link #setOutputDirectory(String) setOutputDirectory}
	 * {@link #setBuilderPackage(String) setBuilderPackage}
	 *
	 * @param rootClassName
	 *            the object graph root class name
	 * @throws ClassNotFoundException if the root class cannot be found on the classpath
	 */
	public static void generateBuilders(String rootClassName)
			throws ClassNotFoundException {
		new BuilderGenerator(rootClassName).generateBuilders();
	}

	/**
	 * Generate builders for an object graph whose graph root is
	 * rootClass.
	 *

	 * Use this utility method when the default builder package and default
	 * output directory are sufficient.
	 *

	 * See:

	 * {@link #setOutputDirectory(String) setOutputDirectory}
	 * {@link #setBuilderPackage(String) setBuilderPackage}
	 *
	 * @param rootClass
	 *            the object graph root class
	 */
	public static void generateBuilders(Class<?> rootClass) {
		new BuilderGenerator(rootClass).generateBuilders();
	}

	private final Class<?> rootClass;
	private final BuilderWriter builderWriter;
	private final FileUtils fileUtils;
	private final PropertiesToIgnore propertiesToIgnore = new PropertiesToIgnore();
	private final ClassesToIgnore classesToIgnore = new ClassesToIgnore();
	private final Map<String, String> builderSuperClass = new HashMap<String, String>();
	private String builderPackage;
	private String outputDirectory;
    private boolean generationGap;
    private String generationGapBaseBuilderPackage;
	private String generationGapBaseBuilderOutputDirectory;

	/**
	 * Construct a BuilderGenerator for an object graph whose graph
	 * root is rootClassName.
	 *
	 * @param rootClassName
	 *            the object graph root class name
	 * @throws ClassNotFoundException if the root class cannot be found on the classpath
	 */
	public BuilderGenerator(String rootClassName) throws ClassNotFoundException {
		this(Class.forName(rootClassName));
	}

	/**
	 * Construct a BuilderGenerator for an object graph whose graph
	 * root is rootClass.
	 *
	 * @param rootClass
	 *            the object graph root class
	 */
	public BuilderGenerator(Class<?> rootClass) {
		this(rootClass, new BuilderWriter(new FileUtils()), new FileUtils());
	}

	BuilderGenerator(Class<?> rootClass, BuilderWriter builderWriter, FileUtils fileUtils) {
	    this.rootClass = rootClass;
        this.builderWriter = builderWriter;
        this.fileUtils = fileUtils;
        setBuilderPackage(deriveDefaultBuilderPackage(rootClass));
        setOutputDirectory(DEFAULT_OUTPUT_DIRECTORY);
    }

    private String deriveDefaultBuilderPackage(Class<?> rootClass) {

		return rootClass.getPackage().getName() + "builder";
	}

	/**
	 * Generate the builders.
	 */
    public void generateBuilders() {

        File outputDirectoryFile = fileUtils.newFile(getOutputDirectory());
        fileUtils.createDirectoriesIfNotExists(outputDirectoryFile);
        BuilderTemplateMapCollector builderTemplateMapCollector = new BuilderTemplateMapCollector(getRootClass(), getBuilderPackage(), propertiesToIgnore, classesToIgnore);
        List<BuilderTemplateMap> builderTemplateMapList = builderTemplateMapCollector.collectBuilderTemplateMaps();

        if (generationGap) {
            builderWriter.generateBuilderInteraface(getGenGapOutputDire(outputDirectoryFile), getGenGapBaseBuilerPackage());
        } else {
            builderWriter.generateBuilderInteraface(outputDirectoryFile, getBuilderPackage());
        }

        for (BuilderTemplateMap builderTemplateMap : builderTemplateMapList) {
        	builderTemplateMap.setSuperClass(builderSuperClass.get(builderTemplateMap.getFullyQualifiedTargetClassName()));
            if (generationGap) {
                String generationGapBaseBuilderPackage = getGenGapBaseBuilerPackage();
                File generationGapBaseBuilderOutputDirectoryFile = getGenGapOutputDire(outputDirectoryFile);
                builderWriter.generateBuilderWithGenerationGap(builderTemplateMap, outputDirectoryFile, generationGapBaseBuilderPackage, generationGapBaseBuilderOutputDirectoryFile);
            } else {
            	builderWriter.generateBuilder(builderTemplateMap, outputDirectoryFile);
            }
        }
    }

    private File getGenGapOutputDire(File defaultOutputDirectoryFileIfNotSet) {
        return getGenerationGapBaseBuilderOutputDirectory() != null ? fileUtils.newFile(getGenerationGapBaseBuilderOutputDirectory()) : defaultOutputDirectoryFileIfNotSet;
    }

    private String getGenGapBaseBuilerPackage() {
        return getGenerationGapBaseBuilderPackage() != null ? getGenerationGapBaseBuilderPackage() : getBuilderPackage();
    }

	Class<?> getRootClass() {
		return rootClass;
	}

	String getBuilderPackage() {
		return builderPackage;
	}

	String getOutputDirectory() {
		return outputDirectory;
	}

    String getGenerationGapBaseBuilderPackage() {
        return generationGapBaseBuilderPackage;
    }

    String getGenerationGapBaseBuilderOutputDirectory() {
    	return generationGapBaseBuilderOutputDirectory;
    }

	/**
	 * Override the default builder package by calling this method.
	 *
	 * @param builderPackage
	 *            the package that generated builders will be written to.
	 */
	public void setBuilderPackage(String builderPackage) {
		this.builderPackage = builderPackage;
	}

	/**
	 * Override the default output directory by calling this method.
	 *
	 * @param outputDirectory
	 *            the output directory that generated builders will be written
	 *            to.
	 */
	public void setOutputDirectory(String outputDirectory) {
		this.outputDirectory = outputDirectory;
	}

	/**
     * @deprecated see {@link #addPropertyToIgnore(String, String) addPropertyToIgnore}
	 *
	 * @param targetClassName the name of the class in which the property is to be ignored
	 * @param propertyName the name of the property in the target class to ignore
	 * @throws ClassNotFoundException if the target class cannot be found on the classpath
	 */
	@Deprecated
	public void setPropertyToIgnore(String targetClassName, String propertyName) throws ClassNotFoundException {
	    addPropertyToIgnore(targetClassName, propertyName);
	}

   /**
     * Specify a property to ignore in a given class.
     *
     * Ignored properties will not appear in the generated builder.
     *
     * @param targetClassName the name of the class in which the property is to be ignored
     * @param propertyName the name of the property in the target class to ignore
     * @throws ClassNotFoundException if the target class cannot be found on the classpath
     */
	public void addPropertyToIgnore(String targetClassName, String propertyName) throws ClassNotFoundException {
	    addPropertyToIgnore(Class.forName(targetClassName), propertyName);
	}

	/**
	 * @deprecated see {@link #addPropertyToIgnore(Class, String) addPropertyToIgnore}
	 *
     * @param targetClass the class in which the property is to be ignored
     * @param propertyName the name of the property in the target class to ignore
	 */
	@Deprecated
	public void setPropertyToIgnore(Class<?> targetClass, String propertyName) {
	    addPropertyToIgnore(targetClass, propertyName);
	}

    /**
     * Specify a property to ignore in a given class.
     *
     * Ignored properties will not appear in the generated builder.
     *
     * @param targetClass the class in which the property is to be ignored
     * @param propertyName the name of the property in the target class to ignore
     */
    public void addPropertyToIgnore(Class<?> targetClass, String propertyName) {
        propertiesToIgnore.addPropertyToIgnore(targetClass, propertyName);
    }

    /**
	 * Add classes that BuilderGenerator will ignore.  I.e. no builder will
	 * be generated for the given class.
	 *

	 * Classes with properties of the ignored types will still have a withProperty method generated
	 * to set the property, but the parameter to the withProperty method will be the property type,
	 * not a builder.
	 *
	 * @param classToIgnore class to ignore
	 */
    public void addClassToIgnore(Class<?> classToIgnore) {
        addClassToIgnore(classToIgnore.getCanonicalName());
    }

    /**
     * Add classes that BuilderGenerator will ignore.  I.e. no builder will
     * be generated for the given class.
     *

     * Classes with properties of the ignored types will still have a withProperty method generated
     * to set the property, but the parameter to the withProperty method will be the property type,
     * not a builder.
     *

     * Wild cards can be used to ignore groups of classes or entire packages (and sub packages), e.g:
     *

     * com.example.MyCla* - will ignore all classes starting with com.example.MyCla

     * com.example* - will ignore all classes in the com.example package (and sub packages)

     *
     * @param classNameToIgnore The class name (with or without trailing wild card) to ignore
     */
    public void addClassToIgnore(String classNameToIgnore) {
        classesToIgnore.add(classNameToIgnore);
    }

    /**
     * Configure whether BuilderGenerator will create builders following the "Generation Gap" pattern.
     *
     * @see www.buildergenerator.co.uk
     * @param generationGap true to create builders following the "Generation Gap" pattern, otherwise false (default).
     */
    public void setGenerationGap(boolean generationGap) {
        this.generationGap = generationGap;
    }

    /**
     * Set the package of the base builders when building using the Generation Gap pattern.
     *
     * @param generationGapBaseBuilderPackage
     *            the package that generated base builders will be written to.
     * @see #setGenerationGap(boolean)
     * @see #setGenerationGapBaseBuilderOutputDirectory(String)
     */
    public void setGenerationGapBaseBuilderPackage(String generationGapBaseBuilderPackage) {
        this.generationGapBaseBuilderPackage = generationGapBaseBuilderPackage;
    }

    /**
     * Set the output directory of the base builders when building using the Generation Gap pattern.
     * If not specified, the base builders will be written to the same output directory as the builders
     * which can be set using the {@link #setOutputDirectory(String)} method.
     *
     * @param generationGapBaseBuilderOutputDirectory
     *            the output directory that generated base builders will be written to.
     * @see #setGenerationGap(boolean)
     * @see #setGenerationGapBaseBuilderPackage(String)
     * @see #setOutputDirectory(String)
     */
    public void setGenerationGapBaseBuilderOutputDirectory(String generationGapBaseBuilderOutputDirectory) {
		this.generationGapBaseBuilderOutputDirectory = generationGapBaseBuilderOutputDirectory;
    }

    /**
     * Specify a fully qualified type statement to follow the extends keyword of the generated builder for the target class.
     *
     * E.g. if you want the generated builder to be specified as extending "com.example.Foo<T extends com.example.Bar>" then pass that string
     * as the superClassStatement parameter.
     *

     * For more details on this feature see www.buildergenerator.co.uk
     *
     * @param targetClass the target class whose generated builder should extend the given superClassStatement.
     * @param superClassStatement the statement to follow the extends keyword of the generated builder, e.g. com.example.SomeClass
     * @see #addBuilderSuperClass(Class, Class)
     */
	public void addBuilderSuperClass(Class<?> targetClass, String superClassStatement) {
		builderSuperClass.put(targetClass.getName(), superClassStatement);
	}

	/**
	 * Specify a custom class that the generated builder for the targetClass should extend.
	 *

	 * This method is expected to be used if you want to add a custom base class to multiple builders that share common code.
	 * It also expects that the base class uses generics in the following way such that any "with" methods in the specified base class
	 * return an instance of the actual sub class builder so method chaining can be performed.  E.g.:
	 *

	 * Custom base builders should be written as follows:
	 *

	 * public abstract class MyCustomBaseBuilder{@code <T extends MyBaseBuilder<T>>} {
	 *
	 *     public T withMyCustomSettingMethod(...) {
	 *         getTarget().setMyCustomSetting(...);
	 *         return (T) this;
	 *     }
	 *
	 *     protected abstract MyTargetClass getTarget();
	 * }
	 *

	 * Implementations for the abstract getTarget method shown are auto generated in the sub class builders.
	 *

	 * You can then tell BuilderGenerator to set this class as the base class of the builder for the target class as follows:
	 *

	 * BuilderGenerator bg = new BuilderGenerator(MyRootClassInHierarchy.class);
	 * bg.addBuilderSuperClass(MyTargetClass.class, MyCustomBaseBuilder.class);
	 * bg.generateBuilders();
	 *

	 * This will generate a builder for MyTargetClass with the following type signature:
	 *

	 * public class MyTargetClassBuilder extends MyCustomBaseBuilder{@code <MyTargetClassBuilder>}
	 *

	 * NOTE: If using this feature with the Generation Gap feature, this method must be called AFTER the setGenerationGap has been called.
	 *

	 * If the base class you want to extend needs a different extends statement, see
	 * {@link #addBuilderSuperClass(Class, String)} which allows you to specify any string to follow the extends keyword.
	 *

	 * For more details on this feature see www.buildergenerator.co.uk
	 *

     * @param targetClass the target class whose generated builder should extend the given superClassStatement.
	 * @param superClass the super class
     * @see #addBuilderSuperClass(Class, String)
	 */
	public void addBuilderSuperClass(Class<?> targetClass, Class<?> superClass) {
	    if (generationGap) {
            addBuilderSuperClass(targetClass, superClass.getName() + "<T>");
	    } else {
	        addBuilderSuperClass(targetClass, superClass.getName() + "<" + targetClass.getSimpleName() +"Builder>");
	    }
	}

}


text:
{% include Aboutme.html %}
{% include Google_search.html%}
{% include Recent_Posts.html %}
{% include Categories.html %}
{% include Tags.html %}
{% include Blogroll.html %}
{% include Archives.html %}


text:
<?xml version="1.0"?>
<Document>

	<Sentence>
		<value>Para-aminobenzoic acid (PABA) is a naturally occurring substance that is often used in sunscreen products.</value>
		<pattern_crowdsource> [[Para-aminobenzoic acid|C0000473]] (PABA) is a naturally occurring substance that is often used in [[sunscreen|C0038818]] products.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Para-aminobenzoic acid</surface-form>
				<RDF-ID>C0000473</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>substance</surface-form>
				<RDF-ID>C0439861</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>often</surface-form>
				<RDF-ID>C0332183</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>sunscreen</surface-form>
				<RDF-ID>C0038818</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>products</surface-form>
				<RDF-ID>C1514468</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0000473 COEXISTS_WITH C0038818</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>PABA is used in certain sunscreen and skin care products.</value>
		<pattern_crowdsource> [[PABA|C0000473]] is used in certain [[sunscreen|C0038818]] and skin care products.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>PABA</surface-form>
				<RDF-ID>C0000473</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>certain</surface-form>
				<RDF-ID>C0205423</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>sunscreen</surface-form>
				<RDF-ID>C0038818</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>skin care</surface-form>
				<RDF-ID>C0150773</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>products</surface-form>
				<RDF-ID>C1514468</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0000473 COEXISTS_WITH C0038818</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>- Coma  - Diarrhea  - Dizziness  - Eye irritation if it touches the eyes  - Fever  - Liver failure  - Nausea  - Rash (allergic)  - Shortness of breath  - Slowed breathing  - Stupor (altered thinking and decreased level of consciousness)  - Vomiting    Note: Most PABA reactions are due to allergic reactions, not overdoses.</value>
		<pattern_crowdsource> - Coma  - Diarrhea  - Dizziness  - Eye irritation if it touches the eyes  - Fever  - Liver failure  - Nausea  - [[Rash|C0015230]] (allergic)  - Shortness of breath  - Slowed breathing  - Stupor (altered thinking and decreased level of consciousness)  - Vomiting    Note: Most PABA reactions are due to [[allergic reactions|C1527304]], not overdoses.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Coma</surface-form>
				<RDF-ID>C0009421</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Diarrhea</surface-form>
				<RDF-ID>C0011991</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Dizziness</surface-form>
				<RDF-ID>C0012833</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Eye irritation</surface-form>
				<RDF-ID>C0235266</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eyes</surface-form>
				<RDF-ID>C0015392</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Fever</surface-form>
				<RDF-ID>C0015967</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Liver failure</surface-form>
				<RDF-ID>C0085605</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Nausea</surface-form>
				<RDF-ID>C0027497</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Rash</surface-form>
				<RDF-ID>C0015230</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>allergic</surface-form>
				<RDF-ID>C0700624</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Shortness</surface-form>
				<RDF-ID>C1282927</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>breath</surface-form>
				<RDF-ID>C0225386</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Slowed breathing</surface-form>
				<RDF-ID>C0231837</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Stupor</surface-form>
				<RDF-ID>C0085628</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>altered</surface-form>
				<RDF-ID>C0205349</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>thinking</surface-form>
				<RDF-ID>C0039869</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>decreased</surface-form>
				<RDF-ID>C0205216</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>consciousness</surface-form>
				<RDF-ID>C0234421</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Vomiting</surface-form>
				<RDF-ID>C0042963</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Note</surface-form>
				<RDF-ID>C1317574</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>PABA</surface-form>
				<RDF-ID>C0000473</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>reactions</surface-form>
				<RDF-ID>C0443286</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>allergic reactions</surface-form>
				<RDF-ID>C1527304</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>not</surface-form>
				<RDF-ID>C1518422</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>overdoses</surface-form>
				<RDF-ID>C0029944</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C1527304 CAUSES C0015230</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Do NOT give water or milk if the patient is having symptoms (such as vomiting, convulsions, or a decreased level of alertness) that make it hard to swallow.</value>
		<pattern_crowdsource> Do NOT give water or milk if the [[patient|C0030705]] is having [[symptoms|C1457887]] (such as vomiting, convulsions, or a decreased level of alertness) that make it hard to swallow.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>NOT</surface-form>
				<RDF-ID>C1518422</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>water</surface-form>
				<RDF-ID>C0043047</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>milk</surface-form>
				<RDF-ID>C0026131</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>patient</surface-form>
				<RDF-ID>C0030705</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>symptoms</surface-form>
				<RDF-ID>C1457887</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>vomiting</surface-form>
				<RDF-ID>C0042963</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>convulsions</surface-form>
				<RDF-ID>C0009951</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>decreased</surface-form>
				<RDF-ID>C0205216</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>alertness</surface-form>
				<RDF-ID>C1443086</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>hard</surface-form>
				<RDF-ID>C0018599</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C1457887 PROCESS_OF C0030705</triple>
		</triples>
	</Sentence>

</Document>


text:
echo "Copy format files to HOME."

cp -r ../.gh_message_templates ~/

echo "Done."


text:
<?php

namespace Sonata\AdminBundle\Generator;

use Sensio\Bundle\GeneratorBundle\Generator\Generator;

/**
 * Class that fixes backward incompatible changes between Sensio Generator 2.2 and 2.3.
 * This class should be removed if support for Symfony 2.2 (and Sensio Generator 2.2) will be dropped.
 *
 * @author Andrej Hudec <pulzarraider@gmail.com>
 */
abstract class AbstractBcGenerator extends Generator
{
    /**
     * @var array
     */
    private $skeletonDirs;

    /**
     * @var boolean
     */
    private $bcEnabled = false;

    /**
     * Returns the Generator Version
     *
     * @return string
     */
    public static function getGeneratorVersion()
    {
        $r = new \ReflectionClass('Sensio\Bundle\GeneratorBundle\Generator\Generator');

        return $r->hasMethod('setSkeletonDirs') === true ? '2.3' : '2.2';
    }

    /**
     * {@inheritdoc}
     */
    public function setSkeletonDirs($skeletonDirs)
    {
        $this->skeletonDirs = is_array($skeletonDirs) ? $skeletonDirs : array($skeletonDirs);

        $this->bcEnabled = false;

        if (self::getGeneratorVersion() === '2.2') {
            $this->bcEnabled = true;
        }

        if (self::getGeneratorVersion() === '2.3') {
            parent::setSkeletonDirs($this->skeletonDirs);
        }
    }

    /**
     * Set backward compatibility with Sensio Generator 2.2.*
     *
     * @param boolean $bcEnabled
     */
    public function setBc($bcEnabled)
    {
        $this->bcEnabled = $bcEnabled;
    }

    /**
     * @param string $template
     * @param array $parameters
     *
     * @return string
     */
    protected function renderBc($template, $parameters)
    {
        if ($this->bcEnabled) {
            // Sensio Generator 2.2
            return $this->render($this->skeletonDirs, $template, $parameters);
        }

        // Sensio Generator >=2.3
        return $this->render($template, $parameters);
    }

    /**
     * @param string $template
     * @param string $target
     * @param array  $parameters
     *
     * @return int
     */
    protected function renderFileBc($template, $target, $parameters)
    {
        if ($this->bcEnabled) {
            // Sensio Generator 2.2
            return $this->renderFile($this->skeletonDirs, $template, $target, $parameters);
        }

        // Sensio Generator >=2.3
        return $this->renderFile($template, $target, $parameters);
    }
}


text:
class Daylite::Roletype < Daylite::Base
  belongs_to :role
end


text:
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

DOCUMENTATION = """
---
cliconf: ironware
short_description: Use ironware cliconf to run command on Extreme Ironware platform
description:
  - This ironware plugin provides low level abstraction apis for
    sending and receiving CLI commands from Extreme Ironware network devices.
version_added: "2.5"
"""

import re
import json

from itertools import chain

from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.network.common.utils import to_list
from ansible.plugins.cliconf import CliconfBase, enable_mode

class Cliconf(CliconfBase):

    def get_device_info(self):
        device_info = {}

        device_info['network_os'] = 'ironware'
        reply = self.send_command('show version')
        data = to_text(reply, errors='surrogate_or_strict').strip()

        match = re.search(r'IronWare : Version (\S+),', data)
        if match:
            device_info['network_os_version'] = match.group(1)

        match = re.search(r'^(?:System Mode\:|System\:) (CES|CER|MLX|XMR)', data, re.M)
        if match:
            device_info['network_os_model'] = match.group(1)

        return device_info

    @enable_mode
    def get_config(self, source='running', format='text', flags=None):
        if source not in ('running', 'startup'):
            raise ValueError("fetching configuration from %s is not supported" % source)

        if source == 'running':
            cmd = 'show running-config'
            if flags is not None:
                cmd += ' ' + ' '.join(flags)

        else:
            cmd = 'show configuration'
            if flags is not None:
                raise ValueError("flags are only supported with running-config")

        return self.send_command(cmd)

    @enable_mode
    def edit_config(self, command):
        for cmd in chain(['configure terminal'], to_list(command), ['end']):
            self.send_command(cmd)

    def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
        return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)

    def get_capabilities(self):
        result = super(Cliconf, self).get_capabilities()
        return json.dumps(result)


text:
package collection // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/internal/collection"

import (
	"reflect"
	"time"

	agentmetricspb "github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1"
	quotav1 "github.com/openshift/api/quota/v1"
	"go.opentelemetry.io/collector/pdata/pmetric"
	"go.uber.org/zap"
	appsv1 "k8s.io/api/apps/v1"
	autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
	batchv1 "k8s.io/api/batch/v1"
	batchv1beta1 "k8s.io/api/batch/v1beta1"
	corev1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/client-go/tools/cache"

	metadata "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata"
)

// TODO: Consider moving some of these constants to
// https://go.opentelemetry.io/collector/blob/main/model/semconv/opentelemetry.go.

// Resource label keys.
const (
	// TODO: Remove after switch to new Metrics definition
	// Resource Type
	k8sType       = "k8s"
	containerType = "container"

	// Resource labels keys for UID.
	k8sKeyNamespaceUID             = "k8s.namespace.uid"
	k8sKeyReplicationControllerUID = "k8s.replicationcontroller.uid"
	k8sKeyHPAUID                   = "k8s.hpa.uid"
	k8sKeyResourceQuotaUID         = "k8s.resourcequota.uid"
	k8sKeyClusterResourceQuotaUID  = "openshift.clusterquota.uid"

	// Resource labels keys for Name.
	k8sKeyReplicationControllerName = "k8s.replicationcontroller.name"
	k8sKeyHPAName                   = "k8s.hpa.name"
	k8sKeyResourceQuotaName         = "k8s.resourcequota.name"
	k8sKeyClusterResourceQuotaName  = "openshift.clusterquota.name"

	// Kubernetes resource kinds
	k8sKindCronJob               = "CronJob"
	k8sKindDaemonSet             = "DaemonSet"
	k8sKindDeployment            = "Deployment"
	k8sKindJob                   = "Job"
	k8sKindReplicationController = "ReplicationController"
	k8sKindReplicaSet            = "ReplicaSet"
	k8sStatefulSet               = "StatefulSet"
)

// DataCollector wraps around a metricsStore and a metadaStore exposing
// methods to perform on the underlying stores. DataCollector also provides
// an interface to interact with refactored code from SignalFx Agent which is
// confined to the collection package.
type DataCollector struct {
	logger                   *zap.Logger
	metricsStore             *metricsStore
	metadataStore            *metadataStore
	nodeConditionsToReport   []string
	allocatableTypesToReport []string
}

// NewDataCollector returns a DataCollector.
func NewDataCollector(logger *zap.Logger, nodeConditionsToReport, allocatableTypesToReport []string) *DataCollector {
	return &DataCollector{
		logger: logger,
		metricsStore: &metricsStore{
			metricsCache: map[types.UID][]*agentmetricspb.ExportMetricsServiceRequest{},
		},
		metadataStore:            &metadataStore{},
		nodeConditionsToReport:   nodeConditionsToReport,
		allocatableTypesToReport: allocatableTypesToReport,
	}
}

// SetupMetadataStore initializes a metadata store for the kubernetes kind.
func (dc *DataCollector) SetupMetadataStore(gvk schema.GroupVersionKind, store cache.Store) {
	dc.metadataStore.setupStore(gvk, store)
}

func (dc *DataCollector) RemoveFromMetricsStore(obj interface{}) {
	if err := dc.metricsStore.remove(obj.(runtime.Object)); err != nil {
		dc.logger.Error(
			"failed to remove from metric cache",
			zap.String("obj", reflect.TypeOf(obj).String()),
			zap.Error(err),
		)
	}
}

func (dc *DataCollector) UpdateMetricsStore(obj interface{}, rm []*resourceMetrics) {
	if err := dc.metricsStore.update(obj.(runtime.Object), rm); err != nil {
		dc.logger.Error(
			"failed to update metric cache",
			zap.String("obj", reflect.TypeOf(obj).String()),
			zap.Error(err),
		)
	}
}

func (dc *DataCollector) CollectMetricData(currentTime time.Time) pmetric.Metrics {
	return dc.metricsStore.getMetricData(currentTime)
}

// SyncMetrics updates the metric store with latest metrics from the kubernetes object.
func (dc *DataCollector) SyncMetrics(obj interface{}) {
	var rm []*resourceMetrics

	switch o := obj.(type) {
	case *corev1.Pod:
		rm = getMetricsForPod(o, dc.logger)
	case *corev1.Node:
		rm = getMetricsForNode(o, dc.nodeConditionsToReport, dc.allocatableTypesToReport, dc.logger)
	case *corev1.Namespace:
		rm = getMetricsForNamespace(o)
	case *corev1.ReplicationController:
		rm = getMetricsForReplicationController(o)
	case *corev1.ResourceQuota:
		rm = getMetricsForResourceQuota(o)
	case *appsv1.Deployment:
		rm = getMetricsForDeployment(o)
	case *appsv1.ReplicaSet:
		rm = getMetricsForReplicaSet(o)
	case *appsv1.DaemonSet:
		rm = getMetricsForDaemonSet(o)
	case *appsv1.StatefulSet:
		rm = getMetricsForStatefulSet(o)
	case *batchv1.Job:
		rm = getMetricsForJob(o)
	case *batchv1.CronJob:
		rm = getMetricsForCronJob(o)
	case *batchv1beta1.CronJob:
		rm = getMetricsForCronJobBeta(o)
	case *autoscalingv2beta2.HorizontalPodAutoscaler:
		rm = getMetricsForHPA(o)
	case *quotav1.ClusterResourceQuota:
		rm = getMetricsForClusterResourceQuota(o)
	default:
		return
	}

	if len(rm) == 0 {
		return
	}

	dc.UpdateMetricsStore(obj, rm)
}

// SyncMetadata updates the metric store with latest metrics from the kubernetes object
func (dc *DataCollector) SyncMetadata(obj interface{}) map[metadata.ResourceID]*KubernetesMetadata {
	km := map[metadata.ResourceID]*KubernetesMetadata{}
	switch o := obj.(type) {
	case *corev1.Pod:
		km = getMetadataForPod(o, dc.metadataStore, dc.logger)
	case *corev1.Node:
		km = getMetadataForNode(o)
	case *corev1.ReplicationController:
		km = getMetadataForReplicationController(o)
	case *appsv1.Deployment:
		km = getMetadataForDeployment(o)
	case *appsv1.ReplicaSet:
		km = getMetadataForReplicaSet(o)
	case *appsv1.DaemonSet:
		km = getMetadataForDaemonSet(o)
	case *appsv1.StatefulSet:
		km = getMetadataForStatefulSet(o)
	case *batchv1.Job:
		km = getMetadataForJob(o)
	case *batchv1.CronJob:
		km = getMetadataForCronJob(o)
	case *batchv1beta1.CronJob:
		km = getMetadataForCronJobBeta(o)
	case *autoscalingv2beta2.HorizontalPodAutoscaler:
		km = getMetadataForHPA(o)
	}

	return km
}


text:
package org.apache.camel.component.hl7;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;

import static org.apache.camel.component.hl7.HL7.convertLFToCR;

public class ConvertLineFeedTest extends CamelTestSupport {

    @Test
    public void testConvertLineFeed() throws Exception {
        String s = "line1\nline2\rline3";
        String result = template.requestBody("direct:test1", s, String.class);
        assertEquals("line1\rline2\rline3", result);
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                from("direct:test1").transform(convertLFToCR());
            }
        };
    }

}


text:
package com.slack.api.app_backend.events.handler;

import com.slack.api.app_backend.events.EventHandler;
import com.slack.api.app_backend.events.payload.GroupOpenPayload;
import com.slack.api.model.event.GroupOpenEvent;

public abstract class GroupOpenHandler extends EventHandler<GroupOpenPayload> {

    @Override
    public String getEventType() {
        return GroupOpenEvent.TYPE_NAME;
    }
}


text:
namespace ui {

namespace {

const char kChromeSelection[] = "CHROME_SELECTION";

const char* kAtomsToCache[] = {
  kChromeSelection,
  NULL
};

}  // namespace

SelectionRequestor::SelectionRequestor(Display* x_display,
                                       Window x_window,
                                       Atom selection_name)
    : x_display_(x_display),
      x_window_(x_window),
      selection_name_(selection_name),
      atom_cache_(x_display_, kAtomsToCache) {
}

SelectionRequestor::~SelectionRequestor() {}

bool SelectionRequestor::PerformBlockingConvertSelection(
    Atom target,
    scoped_refptr<base::RefCountedMemory>* out_data,
    size_t* out_data_bytes,
    size_t* out_data_items,
    Atom* out_type) {
  // The name of the property we're asking to be set on |x_window_|.
  Atom property_to_set = atom_cache_.GetAtom(kChromeSelection);

  XConvertSelection(x_display_,
                    selection_name_,
                    target,
                    property_to_set,
                    x_window_,
                    CurrentTime);

  // Now that we've thrown our message off to the X11 server, we block waiting
  // for a response.
  base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
  base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
  base::RunLoop run_loop;

  // Stop waiting for a response after a certain amount of time.
  const int kMaxWaitTimeForClipboardResponse = 300;
  loop->PostDelayedTask(
      FROM_HERE,
      run_loop.QuitClosure(),
      base::TimeDelta::FromMilliseconds(kMaxWaitTimeForClipboardResponse));

  PendingRequest pending_request(target, run_loop.QuitClosure());
  pending_requests_.push_back(&pending_request);
  run_loop.Run();
  DCHECK(!pending_requests_.empty());
  DCHECK_EQ(&pending_request, pending_requests_.back());
  pending_requests_.pop_back();

  bool success = false;
  if (pending_request.returned_property == property_to_set) {
    success =  ui::GetRawBytesOfProperty(x_window_,
                                         pending_request.returned_property,
                                         out_data, out_data_bytes,
                                         out_data_items, out_type);
  }
  if (pending_request.returned_property != None)
    XDeleteProperty(x_display_, x_window_, pending_request.returned_property);
  return success;
}

SelectionData SelectionRequestor::RequestAndWaitForTypes(
    const std::vector< ::Atom>& types) {
  for (std::vector< ::Atom>::const_iterator it = types.begin();
       it != types.end(); ++it) {
    scoped_refptr<base::RefCountedMemory> data;
    size_t data_bytes = 0;
    ::Atom type = None;
    if (PerformBlockingConvertSelection(*it,
                                        &data,
                                        &data_bytes,
                                        NULL,
                                        &type) &&
        type == *it) {
      return SelectionData(type, data);
    }
  }

  return SelectionData();
}

void SelectionRequestor::OnSelectionNotify(const XSelectionEvent& event) {
  // Find the PendingRequest for the corresponding XConvertSelection call. If
  // there are multiple pending requests on the same target, satisfy them in
  // FIFO order.
  PendingRequest* request_notified = NULL;
  if (selection_name_ == event.selection) {
    for (std::list<PendingRequest*>::iterator iter = pending_requests_.begin();
         iter != pending_requests_.end(); ++iter) {
      PendingRequest* request = *iter;
      if (request->returned)
        continue;
      if (request->target != event.target)
        continue;
      request_notified = request;
      break;
    }
  }

  // This event doesn't correspond to any XConvertSelection calls that we
  // issued in PerformBlockingConvertSelection. This shouldn't happen, but any
  // client can send any message, so it can happen.
  if (!request_notified) {
    // ICCCM requires us to delete the property passed into SelectionNotify. If
    // |request_notified| is true, the property will be deleted when the run
    // loop has quit.
    if (event.property != None)
      XDeleteProperty(x_display_, x_window_, event.property);
    return;
  }

  request_notified->returned_property = event.property;
  request_notified->returned = true;
  request_notified->quit_closure.Run();
}

SelectionRequestor::PendingRequest::PendingRequest(Atom target,
                                                   base::Closure quit_closure)
    : target(target),
      quit_closure(quit_closure),
      returned_property(None),
      returned(false) {
}

SelectionRequestor::PendingRequest::~PendingRequest() {
}

}  // namespace ui