text:
package model;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Random;
import java.util.Set;

public class LDAConfiguration
{
	// -----------------------------------------------
	// 				Parameters
	// -----------------------------------------------

	private int configurationID;
	private int kappa;
	private double alpha;
	private double eta;

	/**
	 * Lists all parametes currently fully or partially supported.
	 */
	public static String[] SUPPORTED_PARAMETERS 	= {"alpha", "eta", "kappa"};

	/**
	 * Contains all LDA parameters currently used in a LDA configuration.
	 */
	public static final Map<String, Integer> PARAMETER_MAP;
	static {
	        Map<String, Integer> tempParameterMap	= new HashMap<String, Integer>();
	        tempParameterMap.put("k", -1);
	        tempParameterMap.put("eta", -1);
	        tempParameterMap.put("alpha", -1);
	        PARAMETER_MAP 							= Collections.unmodifiableMap(tempParameterMap);
	}

	/**
	 * Workaround for the time being: Hardcode ID of LDA configuration representing reference topic model.
	 */
	public static final int REFERENCE_TOPICMODEL_CONFIGID = 2222;

	// -----------------------------------------------
	// -----------------------------------------------
	// 					Methods
	// -----------------------------------------------
	// -----------------------------------------------

	public LDAConfiguration(int configurationID, int kappa, double alpha, double eta)
	{
		this.configurationID 	= configurationID;
		this.kappa				= kappa;
		this.alpha				= alpha;
		this.eta				= eta;
	}

	public LDAConfiguration(final LDAConfiguration source)
	{
		this.configurationID	= source.configurationID;
		this.kappa				= source.kappa;
		this.alpha				= source.alpha;
		this.eta				= source.eta;
	}

	public void copy(final LDAConfiguration source)
	{
		this.configurationID	= source.configurationID;
		this.kappa				= source.kappa;
		this.alpha				= source.alpha;
		this.eta				= source.eta;
	}

	/**
	 * Auto-generated method for generating the hash code of this object.
	 * @return
	 */
	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result		= 1;
		long temp;

		temp	= Double.doubleToLongBits(alpha);
		result	= prime * result + (int) (temp ^ (temp >>> 32));
		temp	= Double.doubleToLongBits(eta);
		result	= prime * result + (int) (temp ^ (temp >>> 32));
		result	= prime * result + kappa;

		return result;
	}

	/**
	 * Auto-generated method for comparing two objects.
	 * @param obj
	 * @return
	 */
	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;

		if (obj == null)
			return false;

		if (getClass() != obj.getClass())
			return false;

		LDAConfiguration other = (LDAConfiguration) obj;

		if (Double.doubleToLongBits(alpha) != Double.doubleToLongBits(other.alpha))
			return false;

		if (Double.doubleToLongBits(eta) != Double.doubleToLongBits(other.eta))
			return false;

		if (kappa != other.kappa)
			return false;

		return true;
	}

	/**
	 * Generates LDA configuration from configuration string.
	 * @param ldaConfigString
	 * @return
	 * @throws Exception
	 * @deprecated
	 */
	public static LDAConfiguration generateLDAConfiguration(String ldaConfigString) throws Exception
	{
		Map<String, Integer> paramMapCopy	= new HashMap<String, Integer>(LDAConfiguration.PARAMETER_MAP);
		Map<String, Double> paramValueMap	= new HashMap<String, Double>();

		// Check for completeness of configuration string.
		paramMapCopy.put("k", ldaConfigString.indexOf("k="));
		paramMapCopy.put("eta", ldaConfigString.indexOf("eta="));
		paramMapCopy.put("alpha", ldaConfigString.indexOf("alpha="));

		for (String key : paramMapCopy.keySet()) {
			if (paramMapCopy.get(key) < 0) {
				throw new Exception("### ERROR ### Metadata incomplete in configuration string @" + key);
			}
		}

		// Parse configuration string.
		for (String paramSubString : ldaConfigString.split("\\|")) {
			String[] paramSubSubStrings = paramSubString.split("=");
			if (paramSubSubStrings.length == 2) {
				paramValueMap.put(paramSubSubStrings[0], Double.valueOf(paramSubSubStrings[1]));
			}
		}

		// Return newly created LDA configuration.
		return new LDAConfiguration( 	-1,
										paramValueMap.get("k").intValue(),
										paramValueMap.get("alpha"),
										paramValueMap.get("eta")
									);
	}

	/**
	 * Combines already generated values to new LDAConfiguration instances, dependend on the chosen sampling mode.
	 * @param numberOfDivisions
	 * @param numberOfDatasetsToGenerate
	 * @param samplingMode
	 * @param parameterValueLists
	 * @return
	 */
	public static ArrayList<LDAConfiguration> generateLDAConfigurations(final int numberOfDivisions, final int numberOfDatasetsToGenerate, final String samplingMode, Map<String, ArrayList<Double>> parameterValueLists)
	{
		ArrayList<LDAConfiguration> configList = new ArrayList<LDAConfiguration>();

		switch (samplingMode) {
			// numberOfDivisions == numberOfDatasetsToGenerate.
			// Combine element at index [i] in list of every parameter to new LDAConfiguration.
			case "Random":
				for (int i = 0; i < numberOfDatasetsToGenerate; i++) {
					int kappa		= parameterValueLists.get("kappa").get(i).intValue();
					double alpha	= parameterValueLists.get("alpha").get(i);
					double eta		= parameterValueLists.get("eta").get(i);

					configList.add(new LDAConfiguration(-1, kappa, alpha, eta));
				}
			break;

			case "Cartesian":
				// For each dataset: Generate all possible combination of datasets with these parameter values.
				// Interate through alpha values.
				for (int i = 0; i < numberOfDivisions; i++) {
					// Interate through eta values.
					for (int j = 0; j < numberOfDivisions; j++) {
						// Interate through kappa values.
						for (int k = 0; k < numberOfDivisions; k++) {
							configList.add(new LDAConfiguration(-1,
																parameterValueLists.get("kappa").get(k).intValue(),
																parameterValueLists.get("alpha").get(i),
																parameterValueLists.get("eta").get(j))
							);
						}

					}

				}
			break;

			case "Latin Hypercube":
				/*
				 * 1. Prepare data.
				 */

				// Initialize collection.
				for (String param : LDAConfiguration.SUPPORTED_PARAMETERS) {
					// Shuffle list.
					Collections.shuffle(parameterValueLists.get(param));
				}

				/*
				 * 2. Pick configurations.
				 */

				for (int i = 0; i < numberOfDatasetsToGenerate; i++) {
					// Since all lists are shuffled: Use list sequence to generate configurations.
					configList.add(new LDAConfiguration(-1,
														parameterValueLists.get("kappa").get(i).intValue(),
														parameterValueLists.get("alpha").get(i),
														parameterValueLists.get("eta").get(i))
					);

				}
			break;

			default:
				System.out.println("Sampling mode '" + samplingMode + "' currently not supported.");
		}

		return configList;
	}

	/**
	 * Tells whether a parameter is supported or not.
	 * @param param
	 * @return
	 */
	public static boolean supports(String param)
	{
		for (String supParam : SUPPORTED_PARAMETERS) {
			if (supParam.equals(param))
				return true;
		}

		return false;
	}

	// -----------------------------------------------
	// 				Getter and setter
	// -----------------------------------------------

	public int getKappa()
	{
		return kappa;
	}

	public double getAlpha()
	{
		return alpha;
	}

	public double getEta()
	{
		return eta;
	}

	public void setKappa(int kappa)
	{
		this.kappa = kappa;
	}

	public void setAlpha(double alpha)
	{
		this.alpha = alpha;
	}

	public void setEta(double eta)
	{
		this.eta = eta;
	}

	public double getParameter(String key)
	{
		double value = Double.MAX_VALUE;

		switch(key) {
			case "alpha":
				value = alpha;
			break;

			case "eta":
				value = eta;
			break;

			case "kappa":
				value = (double)kappa;
			break;
		}

		return value;
	}

	@Override
	public String toString()
	{
		return "k=" + kappa + "|alpha=" + alpha + "|eta=" + eta;
	}

	/**
	 * Returns corresponding symbol for parameter.
	 * @param key
	 * @return
	 */
	public static String getSymbolForParameter(String key)
	{
		String symbol;

		switch(key) {
			case "alpha":
				symbol = "α";
			break;

			case "eta":
				symbol = "η";
			break;

			case "kappa":
				symbol = "κ";
			break;

			case "distance":
				symbol = "δ";
			break;

			default:
				symbol = "?";
		}

		return symbol;
	}

	public int getConfigurationID()
	{
		return configurationID;
	}
}


text:
"use strict";

var app = angular.module("app", ['ngRoute']);

app.config(function ($routeProvider, $locationProvider) {

    $routeProvider
        .when("/", {
        templateUrl: "/views/home.html",
        controller: 'homeCtrl'
        }).
        otherwise({ redirectTo: '/' });

    $locationProvider.html5Mode(true);

});

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Tristania clementis Merr.

### Remarks
null


text:
package com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.model.Contact;
import com.repository.ContactRepository;

@RestController
@RequestMapping("/person")
public class ContactMeController {

	@Autowired
	private ContactRepository contactRepo;

	@RequestMapping(method=RequestMethod.GET)
	public @ResponseBody Contact getPersonInfo() {
		Contact p1 = contactRepo.findOne(1l);
		return p1;
	}

	@RequestMapping(method=RequestMethod.POST)
	public void createContact(@RequestBody Contact contact) {
		contactRepo.save(contact);
	}

}


text:
{% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %}
{% if site.disqus_short_name and page.comments != false %}
<script type="text/javascript">
      var disqus_shortname = '{{ site.disqus_short_name }}';
      {% if page.comments == true %}
        {% comment %} `page.comments` can be only be set to true on pages/posts, so we embed the comments here. {% endcomment %}
        // var disqus_developer = 1;
        var disqus_identifier = '{{ site.url }}{{ page.url }}';
        var disqus_url = '{{ site.url }}{{ page.url }}';
        var disqus_script = 'embed.js';
      {% else %}
        {% comment %} As `page.comments` is empty, we must be on the index page. {% endcomment %}
        var disqus_script = 'count.js';
      {% endif %}
    (function () {
      var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
      dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    }());
</script>
{% endif %}


text:
#pragma once
#include <aws/iot/IoT_EXPORTS.h>
#include <aws/iot/model/RetryableFailureType.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace IoT
{
namespace Model
{

  /**
   *
The criteria that determines how many retries are allowed for each failure
   * type for a job.

See Also:
   AWS
   * API Reference

   */
  class AWS_IOT_API RetryCriteria
  {
  public:
    RetryCriteria();
    RetryCriteria(Aws::Utils::Json::JsonView jsonValue);
    RetryCriteria& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The type of job execution failures that can initiate a job retry.

     */
    inline const RetryableFailureType& GetFailureType() const{ return m_failureType; }

    /**
     *
The type of job execution failures that can initiate a job retry.

     */
    inline bool FailureTypeHasBeenSet() const { return m_failureTypeHasBeenSet; }

    /**
     *
The type of job execution failures that can initiate a job retry.

     */
    inline void SetFailureType(const RetryableFailureType& value) { m_failureTypeHasBeenSet = true; m_failureType = value; }

    /**
     *
The type of job execution failures that can initiate a job retry.

     */
    inline void SetFailureType(RetryableFailureType&& value) { m_failureTypeHasBeenSet = true; m_failureType = std::move(value); }

    /**
     *
The type of job execution failures that can initiate a job retry.

     */
    inline RetryCriteria& WithFailureType(const RetryableFailureType& value) { SetFailureType(value); return *this;}

    /**
     *
The type of job execution failures that can initiate a job retry.

     */
    inline RetryCriteria& WithFailureType(RetryableFailureType&& value) { SetFailureType(std::move(value)); return *this;}

    /**
     *
The number of retries allowed for a failure type for the job.

     */
    inline int GetNumberOfRetries() const{ return m_numberOfRetries; }

    /**
     *
The number of retries allowed for a failure type for the job.

     */
    inline bool NumberOfRetriesHasBeenSet() const { return m_numberOfRetriesHasBeenSet; }

    /**
     *
The number of retries allowed for a failure type for the job.

     */
    inline void SetNumberOfRetries(int value) { m_numberOfRetriesHasBeenSet = true; m_numberOfRetries = value; }

    /**
     *
The number of retries allowed for a failure type for the job.

     */
    inline RetryCriteria& WithNumberOfRetries(int value) { SetNumberOfRetries(value); return *this;}

  private:

    RetryableFailureType m_failureType;
    bool m_failureTypeHasBeenSet = false;

    int m_numberOfRetries;
    bool m_numberOfRetriesHasBeenSet = false;
  };

} // namespace Model
} // namespace IoT
} // namespace Aws


text:
using namespace llvm;

#define GET_INSTRINFO_CTOR_DTOR
#define GET_INSTRINFO_NAMED_OPS
#define GET_INSTRMAP_INFO
#include "AMDGPUGenInstrInfo.inc"

// Pin the vtable to this file.
void AMDGPUInstrInfo::anchor() {}

AMDGPUInstrInfo::AMDGPUInstrInfo(const AMDGPUSubtarget &st)
    : AMDGPUGenInstrInfo(-1, -1), ST(st) {}

const AMDGPURegisterInfo &AMDGPUInstrInfo::getRegisterInfo() const {
  return RI;
}

bool AMDGPUInstrInfo::isCoalescableExtInstr(const MachineInstr &MI,
                                           unsigned &SrcReg, unsigned &DstReg,
                                           unsigned &SubIdx) const {
// TODO: Implement this function
  return false;
}

unsigned AMDGPUInstrInfo::isLoadFromStackSlot(const MachineInstr *MI,
                                             int &FrameIndex) const {
// TODO: Implement this function
  return 0;
}

unsigned AMDGPUInstrInfo::isLoadFromStackSlotPostFE(const MachineInstr *MI,
                                                   int &FrameIndex) const {
// TODO: Implement this function
  return 0;
}

bool AMDGPUInstrInfo::hasLoadFromStackSlot(const MachineInstr *MI,
                                          const MachineMemOperand *&MMO,
                                          int &FrameIndex) const {
// TODO: Implement this function
  return false;
}
unsigned AMDGPUInstrInfo::isStoreFromStackSlot(const MachineInstr *MI,
                                              int &FrameIndex) const {
// TODO: Implement this function
  return 0;
}
unsigned AMDGPUInstrInfo::isStoreFromStackSlotPostFE(const MachineInstr *MI,
                                                    int &FrameIndex) const {
// TODO: Implement this function
  return 0;
}
bool AMDGPUInstrInfo::hasStoreFromStackSlot(const MachineInstr *MI,
                                           const MachineMemOperand *&MMO,
                                           int &FrameIndex) const {
// TODO: Implement this function
  return false;
}

MachineInstr *
AMDGPUInstrInfo::convertToThreeAddress(MachineFunction::iterator &MFI,
                                      MachineBasicBlock::iterator &MBBI,
                                      LiveVariables *LV) const {
// TODO: Implement this function
  return nullptr;
}

void
AMDGPUInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
                                    MachineBasicBlock::iterator MI,
                                    unsigned SrcReg, bool isKill,
                                    int FrameIndex,
                                    const TargetRegisterClass *RC,
                                    const TargetRegisterInfo *TRI) const {
  llvm_unreachable("Not Implemented");
}

void
AMDGPUInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
                                     MachineBasicBlock::iterator MI,
                                     unsigned DestReg, int FrameIndex,
                                     const TargetRegisterClass *RC,
                                     const TargetRegisterInfo *TRI) const {
  llvm_unreachable("Not Implemented");
}

bool AMDGPUInstrInfo::expandPostRAPseudo (MachineBasicBlock::iterator MI) const {
  MachineBasicBlock *MBB = MI->getParent();
  int OffsetOpIdx = AMDGPU::getNamedOperandIdx(MI->getOpcode(),
                                               AMDGPU::OpName::addr);
   // addr is a custom operand with multiple MI operands, and only the
   // first MI operand is given a name.
  int RegOpIdx = OffsetOpIdx + 1;
  int ChanOpIdx = AMDGPU::getNamedOperandIdx(MI->getOpcode(),
                                             AMDGPU::OpName::chan);
  if (isRegisterLoad(*MI)) {
    int DstOpIdx = AMDGPU::getNamedOperandIdx(MI->getOpcode(),
                                              AMDGPU::OpName::dst);
    unsigned RegIndex = MI->getOperand(RegOpIdx).getImm();
    unsigned Channel = MI->getOperand(ChanOpIdx).getImm();
    unsigned Address = calculateIndirectAddress(RegIndex, Channel);
    unsigned OffsetReg = MI->getOperand(OffsetOpIdx).getReg();
    if (OffsetReg == AMDGPU::INDIRECT_BASE_ADDR) {
      buildMovInstr(MBB, MI, MI->getOperand(DstOpIdx).getReg(),
                    getIndirectAddrRegClass()->getRegister(Address));
    } else {
      buildIndirectRead(MBB, MI, MI->getOperand(DstOpIdx).getReg(),
                        Address, OffsetReg);
    }
  } else if (isRegisterStore(*MI)) {
    int ValOpIdx = AMDGPU::getNamedOperandIdx(MI->getOpcode(),
                                              AMDGPU::OpName::val);
    unsigned RegIndex = MI->getOperand(RegOpIdx).getImm();
    unsigned Channel = MI->getOperand(ChanOpIdx).getImm();
    unsigned Address = calculateIndirectAddress(RegIndex, Channel);
    unsigned OffsetReg = MI->getOperand(OffsetOpIdx).getReg();
    if (OffsetReg == AMDGPU::INDIRECT_BASE_ADDR) {
      buildMovInstr(MBB, MI, getIndirectAddrRegClass()->getRegister(Address),
                    MI->getOperand(ValOpIdx).getReg());
    } else {
      buildIndirectWrite(MBB, MI, MI->getOperand(ValOpIdx).getReg(),
                         calculateIndirectAddress(RegIndex, Channel),
                         OffsetReg);
    }
  } else {
    return false;
  }

  MBB->erase(MI);
  return true;
}

MachineInstr *AMDGPUInstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
                                                     MachineInstr *MI,
                                                     ArrayRef<unsigned> Ops,
                                                     int FrameIndex) const {
// TODO: Implement this function
  return nullptr;
}
MachineInstr *
AMDGPUInstrInfo::foldMemoryOperandImpl(MachineFunction &MF, MachineInstr *MI,
                                       ArrayRef<unsigned> Ops,
                                       MachineInstr *LoadMI) const {
  // TODO: Implement this function
  return nullptr;
}
bool AMDGPUInstrInfo::canFoldMemoryOperand(const MachineInstr *MI,
                                           ArrayRef<unsigned> Ops) const {
  // TODO: Implement this function
  return false;
}
bool
AMDGPUInstrInfo::unfoldMemoryOperand(MachineFunction &MF, MachineInstr *MI,
                                 unsigned Reg, bool UnfoldLoad,
                                 bool UnfoldStore,
                                 SmallVectorImpl<MachineInstr*> &NewMIs) const {
  // TODO: Implement this function
  return false;
}

bool
AMDGPUInstrInfo::unfoldMemoryOperand(SelectionDAG &DAG, SDNode *N,
                                    SmallVectorImpl<SDNode*> &NewNodes) const {
  // TODO: Implement this function
  return false;
}

unsigned
AMDGPUInstrInfo::getOpcodeAfterMemoryUnfold(unsigned Opc,
                                           bool UnfoldLoad, bool UnfoldStore,
                                           unsigned *LoadRegIndex) const {
  // TODO: Implement this function
  return 0;
}

bool AMDGPUInstrInfo::enableClusterLoads() const {
  return true;
}

// FIXME: This behaves strangely. If, for example, you have 32 load + stores,
// the first 16 loads will be interleaved with the stores, and the next 16 will
// be clustered as expected. It should really split into 2 16 store batches.
//
// Loads are clustered until this returns false, rather than trying to schedule
// groups of stores. This also means we have to deal with saying different
// address space loads should be clustered, and ones which might cause bank
// conflicts.
//
// This might be deprecated so it might not be worth that much effort to fix.
bool AMDGPUInstrInfo::shouldScheduleLoadsNear(SDNode *Load0, SDNode *Load1,
                                              int64_t Offset0, int64_t Offset1,
                                              unsigned NumLoads) const {
  assert(Offset1 > Offset0 &&
         "Second offset should be larger than first offset!");
  // If we have less than 16 loads in a row, and the offsets are within 64
  // bytes, then schedule together.

  // A cacheline is 64 bytes (for global memory).
  return (NumLoads <= 16 && (Offset1 - Offset0) < 64);
}

bool
AMDGPUInstrInfo::ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond)
  const {
  // TODO: Implement this function
  return true;
}
void AMDGPUInstrInfo::insertNoop(MachineBasicBlock &MBB,
                                MachineBasicBlock::iterator MI) const {
  // TODO: Implement this function
}

bool AMDGPUInstrInfo::isPredicated(const MachineInstr *MI) const {
  // TODO: Implement this function
  return false;
}
bool
AMDGPUInstrInfo::SubsumesPredicate(const SmallVectorImpl<MachineOperand> &Pred1,
                                  const SmallVectorImpl<MachineOperand> &Pred2)
  const {
  // TODO: Implement this function
  return false;
}

bool AMDGPUInstrInfo::DefinesPredicate(MachineInstr *MI,
                                      std::vector<MachineOperand> &Pred) const {
  // TODO: Implement this function
  return false;
}

bool AMDGPUInstrInfo::isPredicable(MachineInstr *MI) const {
  // TODO: Implement this function
  return MI->getDesc().isPredicable();
}

bool
AMDGPUInstrInfo::isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const {
  // TODO: Implement this function
  return true;
}

bool AMDGPUInstrInfo::isRegisterStore(const MachineInstr &MI) const {
  return get(MI.getOpcode()).TSFlags & AMDGPU_FLAG_REGISTER_STORE;
}

bool AMDGPUInstrInfo::isRegisterLoad(const MachineInstr &MI) const {
  return get(MI.getOpcode()).TSFlags & AMDGPU_FLAG_REGISTER_LOAD;
}

int AMDGPUInstrInfo::getIndirectIndexBegin(const MachineFunction &MF) const {
  const MachineRegisterInfo &MRI = MF.getRegInfo();
  const MachineFrameInfo *MFI = MF.getFrameInfo();
  int Offset = -1;

  if (MFI->getNumObjects() == 0) {
    return -1;
  }

  if (MRI.livein_empty()) {
    return 0;
  }

  const TargetRegisterClass *IndirectRC = getIndirectAddrRegClass();
  for (MachineRegisterInfo::livein_iterator LI = MRI.livein_begin(),
                                            LE = MRI.livein_end();
                                            LI != LE; ++LI) {
    unsigned Reg = LI->first;
    if (TargetRegisterInfo::isVirtualRegister(Reg) ||
        !IndirectRC->contains(Reg))
      continue;

    unsigned RegIndex;
    unsigned RegEnd;
    for (RegIndex = 0, RegEnd = IndirectRC->getNumRegs(); RegIndex != RegEnd;
                                                          ++RegIndex) {
      if (IndirectRC->getRegister(RegIndex) == Reg)
        break;
    }
    Offset = std::max(Offset, (int)RegIndex);
  }

  return Offset + 1;
}

int AMDGPUInstrInfo::getIndirectIndexEnd(const MachineFunction &MF) const {
  int Offset = 0;
  const MachineFrameInfo *MFI = MF.getFrameInfo();

  // Variable sized objects are not supported
  assert(!MFI->hasVarSizedObjects());

  if (MFI->getNumObjects() == 0) {
    return -1;
  }

  Offset = MF.getSubtarget().getFrameLowering()->getFrameIndexOffset(MF, -1);

  return getIndirectIndexBegin(MF) + Offset;
}

int AMDGPUInstrInfo::getMaskedMIMGOp(uint16_t Opcode, unsigned Channels) const {
  switch (Channels) {
  default: return Opcode;
  case 1: return AMDGPU::getMaskedMIMGOp(Opcode, AMDGPU::Channels_1);
  case 2: return AMDGPU::getMaskedMIMGOp(Opcode, AMDGPU::Channels_2);
  case 3: return AMDGPU::getMaskedMIMGOp(Opcode, AMDGPU::Channels_3);
  }
}

// Wrapper for Tablegen'd function.  enum Subtarget is not defined in any
// header files, so we need to wrap it in a function that takes unsigned
// instead.
namespace llvm {
namespace AMDGPU {
static int getMCOpcode(uint16_t Opcode, unsigned Gen) {
  return getMCOpcodeGen(Opcode, (enum Subtarget)Gen);
}
}
}

// This must be kept in sync with the SISubtarget class in SIInstrInfo.td
enum SISubtarget {
  SI = 0,
  VI = 1
};

static enum SISubtarget AMDGPUSubtargetToSISubtarget(unsigned Gen) {
  switch (Gen) {
  default:
    return SI;
  case AMDGPUSubtarget::VOLCANIC_ISLANDS:
    return VI;
  }
}

int AMDGPUInstrInfo::pseudoToMCOpcode(int Opcode) const {
  int MCOp = AMDGPU::getMCOpcode(
      Opcode, AMDGPUSubtargetToSISubtarget(ST.getGeneration()));

  // -1 means that Opcode is already a native instruction.
  if (MCOp == -1)
    return Opcode;

  // (uint16_t)-1 means that Opcode is a pseudo instruction that has
  // no encoding in the given subtarget generation.
  if (MCOp == (uint16_t)-1)
    return -1;

  return MCOp;
}


text:
require 'rails_helper'

feature "Network" do
  background do
    @section = create(:section)
    @subnet = create(:subnet, section: @section, mask: 30)
    @address = create(:address, subnet: @subnet, active: true)
  end

  scenario "can see all addresses belonging to a subnet" do
    visit sections_path

    find(".fa-list").find(:xpath, "..").click
    find(".fa-list").find(:xpath, "..").click

    expect(page).to have_content @address.ip
    expect(page).to have_content "Si"
  end
end


text:
package ui

import (
	"bufio"
	"fmt"
	"io/ioutil"
	"os"
	"os/exec"
	"strings"
	"syscall"
	"time"

	"github.com/pkg/errors"

	"golang.org/x/crypto/ssh/terminal"
)

//Terminal allows command-line interaction with the user
type Terminal struct {
	editor string
	loc    *time.Location
}

//NewTerminal returns a new terminal instance with the provided editor
func NewTerminal(e string, l *time.Location) *Terminal {
	return &Terminal{
		editor: e,
		loc:    l,
	}
}

//SetLocation sets the client's local location
func (t *Terminal) SetLocation(l *time.Location) {
	t.loc = l
}

//Location returns the user's location (to determine timezone)
func (t *Terminal) Location() *time.Location {
	return t.loc
}

//Wait displays a message and waits for the user to press enter
func (t *Terminal) Wait() error {
	fmt.Println("Press enter to continue, Ctrl-c to exit")
	reader := bufio.NewReader(os.Stdin)
	_, err := reader.ReadString('\n')
	return err
}

//Edit opens contents in an editor and allows the user to edit them
func (t *Terminal) Edit(og []byte) ([]byte, error) {
	fileName, err := setupFile(og)
	if err != nil {
		return []byte{}, errors.Wrap(err, "error setting up a file to edit")
	}

	if err := editFile(fileName, t.editor); err != nil {
		return []byte{}, errors.Wrap(err, "error editing file")
	}

	return ioutil.ReadFile(fileName)
}

func setupFile(contents []byte) (string, error) {
	f, err := ioutil.TempFile("", "slowmo-times")
	if err != nil {
		return "", errors.Wrap(err, "error opening temporary file to edit")
	}

	if _, err := f.Write(contents); err != nil {
		return "", errors.Wrap(err, "error writing contents to temporary file")
	}

	return f.Name(), nil
}

func editFile(fileName string, editor string) error {
	cmd := exec.Command(editor, fileName)
	cmd.Stdin = os.Stdin
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr

	if err := cmd.Start(); err != nil {
		return errors.Wrap(err, "error starting editor")
	}

	if err := cmd.Wait(); err != nil {
		return errors.Wrap(err, "error waiting for editor")
	}

	return nil
}

//Display displays a string
func (t *Terminal) Display(a ...interface{}) {
	fmt.Print(a...)
}

//Displayf displays an interpolated string
func (t *Terminal) Displayf(c string, a ...interface{}) {
	fmt.Printf(c, a...)
}

//Displayln displays a string followed by a carriage return
func (t *Terminal) Displayln(a ...interface{}) {
	fmt.Println(a...)
}

//Read reads from stdin until a carriage return, then trims any whitespace
func (t *Terminal) Read() (string, error) {
	reader := bufio.NewReader(os.Stdin)

	e, err := reader.ReadString('\n')
	if err != nil {
		return "", errors.Wrap(err, "Username broke a thing")
	}

	return strings.TrimSpace(e), nil
}

//ReadPassword reads from stdin, not displaying the results to the terminal, until a carriage return, then trims any whitespace
func (t *Terminal) ReadPassword() (string, error) {
	bytePassword, err := terminal.ReadPassword(int(syscall.Stdin))
	fmt.Println("") // otherwise later prints start on this line
	if err != nil {
		return "", errors.Wrap(err, "Password broke a thing")
	}

	return strings.TrimSpace(string(bytePassword)), nil
}


text:
from __future__ import absolute_import
import re

from w3lib import html

from ants.utils import log
from ants.utils.exceptions import NotConfigured
from ants.http import HtmlResponse
from ants.utils.response import _noscript_re, _script_re

class AjaxCrawlMiddleware(object):
    """
    Handle 'AJAX crawlable' pages marked as crawlable via meta tag.
    For more info see https://developers.google.com/webmasters/ajax-crawling/docs/getting-started.
    """

    def __init__(self, settings):
        if not settings.getbool('AJAXCRAWL_ENABLED'):
            raise NotConfigured

        # XXX: Google parses at least first 100k bytes; ants's redirect
        # middleware parses first 4k. 4k turns out to be insufficient
        # for this middleware, and parsing 100k could be slow.
        # We use something in between (32K) by default.
        self.lookup_bytes = settings.getint('AJAXCRAWL_MAXSIZE', 32768)

    @classmethod
    def from_crawler(cls, crawler):
        return cls(crawler.settings)

    def process_response(self, request, response, spider):

        if not isinstance(response, HtmlResponse) or response.status != 200:
            return response

        if request.method != 'GET':
            # other HTTP methods are either not safe or don't have a body
            return response

        if 'ajax_crawlable' in request.meta:  # prevent loops
            return response

        if not self._has_ajax_crawlable_variant(response):
            return response

        # ants already handles #! links properly
        ajax_crawl_request = request.replace(url=request.url + '#!')
        log.spider_log("Downloading AJAX crawlable " + ajax_crawl_request + " instead of " + request.url,
                       level=log.DEBUG, spider=spider)

        ajax_crawl_request.meta['ajax_crawlable'] = True
        return ajax_crawl_request

    def _has_ajax_crawlable_variant(self, response):
        """
        Return True if a page without hash fragment could be "AJAX crawlable"
        according to https://developers.google.com/webmasters/ajax-crawling/docs/getting-started.
        """
        body = response.body_as_unicode()[:self.lookup_bytes]
        return _has_ajaxcrawlable_meta(body)

# XXX: move it to w3lib?
_ajax_crawlable_re = re.compile(ur'<meta\s+name=["\']fragment["\']\s+content=["\']!["\']/?>')

def _has_ajaxcrawlable_meta(text):
    """
    >>> _has_ajaxcrawlable_meta('<meta name="fragment"  content="!"/>')
    True
    >>> _has_ajaxcrawlable_meta("<meta name='fragment' content='!'>")
    True
    >>> _has_ajaxcrawlable_meta('')
    False
    >>> _has_ajaxcrawlable_meta('')
    False
    """

    # Stripping scripts and comments is slow (about 20x slower than
    # just checking if a string is in text); this is a quick fail-fast
    # path that should work for most pages.
    if 'fragment' not in text:
        return False
    if 'content' not in text:
        return False

    text = _script_re.sub(u'', text)
    text = _noscript_re.sub(u'', text)
    text = html.remove_comments(html.replace_entities(text))
    return _ajax_crawlable_re.search(text) is not None


text:
package com.huawei.streaming.process.join;

import java.util.ArrayDeque;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.huawei.streaming.common.MultiKey;
import com.huawei.streaming.common.Pair;
import com.huawei.streaming.event.IEvent;

/**
 *
 * 双数据流Cross Join操作
 * 无等值条件,可以有过滤条件
 * 匹配所有事件
 * 无匹配事件时,输出可为带空事件的匹配
 *
 */
public class CrossBiJoinComposer implements IJoinComposer
{
    /**
     * 注释内容
     */
    private static final long serialVersionUID = -705647270478065074L;

    private static final Logger LOG = LoggerFactory.getLogger(CrossBiJoinComposer.class);

    private static final int STREAM_NUM = 2;

    private SimpleEventCollection leftStream;

    private SimpleEventCollection rightStream;

    private Set<MultiKey> oldResults = new LinkedHashSet<MultiKey>();

    private Set<MultiKey> newResults = new LinkedHashSet<MultiKey>();

    /**
     * 是否计算RSTREAM
     */
    private boolean joinRStream;

    /**
     * <默认构造函数>
     *@param left  左流有效数据
     *@param right 右流有效数据
     *@param rStream 是否计算RSTREAM
     */
    public CrossBiJoinComposer(SimpleEventCollection left, SimpleEventCollection right, boolean rStream)
    {
        LOG.debug("Initiate CrossBiJoinComposer. Left stream name={}, Right stream name={}, joinRStream={}.",
            new Object[] {left.getStreamName(), right.getStreamName(), rStream});
        this.leftStream = left;
        this.rightStream = right;
        this.joinRStream = rStream;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Pair<Set<MultiKey>, Set<MultiKey>> join(IEvent[][] newDataPerStream, IEvent[][] oldDataPerStream)
    {
        if (null == newDataPerStream && null == oldDataPerStream)
        {
            throw new RuntimeException("Mission impossible.");
        }

        if ((null != newDataPerStream && newDataPerStream.length != STREAM_NUM)
            || (null != oldDataPerStream && oldDataPerStream.length != STREAM_NUM))
        {
            LOG.error("This updated streams numbers is not for Cross Bi Stream Join.");
            throw new RuntimeException("This updated streams numbers is not for Bi Stream Join.");
        }

        newResults.clear();
        oldResults.clear();

        if (joinRStream)
        {
            if (null != oldDataPerStream)
            {
                for (int streamIndex = 0; streamIndex < oldDataPerStream.length; streamIndex++)
                {
                    compose(oldDataPerStream[streamIndex], streamIndex, oldResults);
                }
            }
        }

        if (null != newDataPerStream)
        {
            for (int streamIndex = 0; streamIndex < newDataPerStream.length; streamIndex++)
            {
                compose(newDataPerStream[streamIndex], streamIndex, newResults);
            }
        }

        return new Pair<Set<MultiKey>, Set<MultiKey>>(newResults, oldResults);
    }

    /**
     * 针对每个更新数据,与对方流有效数据进行全匹配
     * 如果对方 流中没有有效数据,至少输出一条结果数据
     */
    private void compose(IEvent[] events, int streamIndex, Set<MultiKey> result)
    {
        if (events == null || events.length == 0)
        {
            return;
        }

        ArrayDeque<IEvent[]> joinTemp = new ArrayDeque<IEvent[]>();
        for (IEvent theEvent : events)
        {
            perEventCompose(theEvent, streamIndex, joinTemp);

            for (IEvent[] row : joinTemp)
            {
                result.add(new MultiKey(row));
            }
            joinTemp.clear();
        }

    }

    /**
     * 进行全匹配JOIN
     * 如果joinTemp结果无事件,至少输出一条结果
     */
    private void perEventCompose(IEvent lookupEvent, int index, Collection<IEvent[]> result)
    {
        if (null == lookupEvent)
        {
            return;
        }

        Set<IEvent> joinedEvents;

        if (index == 0) //当前数据为left流,与right流JOIN
        {

            joinedEvents = rightStream.lookupAllWithNull();
        }
        else
        //当前数据为right流,与left流JOIN
        {
            joinedEvents = leftStream.lookupAllWithNull();
        }

        // Create result row for each found event
        for (IEvent joinedEvent : joinedEvents)
        {
            IEvent[] events = new IEvent[STREAM_NUM];
            events[index] = lookupEvent;
            events[STREAM_NUM - index - 1] = joinedEvent;
            result.add(events);
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void maintainData(IEvent[][] newDataPerStream, IEvent[][] oldDataPerStream)
    {
        if (newDataPerStream.length != STREAM_NUM || oldDataPerStream.length != STREAM_NUM)
        {
            LOG.error("This updated streams numbers is not for Bi Stream Join.");
            throw new RuntimeException("This updated streams numbers is not for Bi Stream Join.");
        }

        leftStream.addRemove(newDataPerStream[0], oldDataPerStream[0]);
        rightStream.addRemove(newDataPerStream[1], oldDataPerStream[1]);
    }

    @Override
    public int getStreamsSize()
    {
        return STREAM_NUM;
    }

    public SimpleEventCollection getLeftStream()
    {
        return leftStream;
    }

    public SimpleEventCollection getRightStream()
    {
        return rightStream;
    }

}


text:
<?php
// src/AppBundle/Entity/User.php

namespace AppBundle\Entity;

use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints\DateTime;

/**
 * @ORM\Entity
 * @ORM\Table(name="fos_user")
 * @ORM\Entity(repositoryClass="AppBundle\Repository\UserRepository")
 */
class User extends BaseUser
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    public function __construct()
    {
        parent::__construct();
        // your own logic
        $this->roles = array('ROLE_CLIENT');
        $this->createdAt = new \DateTime();
    }

    /**
     * @ORM\Column(name="firstname", type="string")
     */
    protected $firstname;

    /**
     * @ORM\Column(name="lastname", type="string")
     */
    protected $lastname;

    /**
     * @ORM\Column(name="civility", type="string")
     */
    protected $civility;

    /**
     * @ORM\Column(name="phone_number", type="integer", nullable=true)
     */
    protected $phoneNumber;

    /**
     * @ORM\Column(name="birthday", type="date", nullable=true)
     */
    protected $birthday;

    /**
     * @ORM\Column(name="created_at", type="datetime")
     */
    protected $createdAt;

    /**
     * @ORM\OneToOne(targetEntity="AppBundle\Entity\InvoiceUser", cascade={"persist", "remove"}, fetch="EAGER")
     */
    protected $invoice;

    /**
     * @ORM\OneToOne(targetEntity="AppBundle\Entity\AddressUser", cascade={"persist","remove"}, fetch="EAGER")
     */
    protected $address;

    /**
     * Set firstname
     *
     * @param string $firstname
     *
     * @return User
     */
    public function setFirstname($firstname)
    {
        $this->firstname = $firstname;
        return $this;
    }

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

    /**
     * Set lastname
     *
     * @param string $lastname
     *
     * @return User
     */
    public function setLastname($lastname)
    {
        $this->lastname = $lastname;

        return $this;
    }

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

    /**
     * Set civility
     *
     * @param string $civility
     *
     * @return User
     */
    public function setCivility($civility)
    {
        $this->civility = $civility;

        return $this;
    }

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

    /**
     * Set phoneNumber
     *
     * @param integer $phoneNumber
     *
     * @return User
     */
    public function setPhoneNumber($phoneNumber)
    {
        $this->phoneNumber = $phoneNumber;

        return $this;
    }

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

    /**
     * Set birthday
     *
     * @param \DateTime $birthday
     *
     * @return User
     */
    public function setBirthday($birthday)
    {
        $this->birthday = $birthday;

        return $this;
    }

    /**
     * Get birthday
     *
     * @return \DateTime
     */
    public function getBirthday()
    {
        return $this->birthday;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     *
     * @return User
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;
        die();
        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set address
     *
     * @param \AppBundle\Entity\AddressUser $address
     *
     * @return User
     */
    public function setAddress(\AppBundle\Entity\AddressUser $address = null)
    {
        $this->address = $address;

        return $this;
    }

    /**
     * Get address
     *
     * @return \AppBundle\Entity\AddressUser
     */
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * Set invoice
     *
     * @param \AppBundle\Entity\InvoiceUser $invoice
     *
     * @return User
     */
    public function setInvoice(\AppBundle\Entity\InvoiceUser $invoice = null)
    {
        $this->invoice = $invoice;

        return $this;
    }

    /**
     * Get invoice
     *
     * @return \AppBundle\Entity\InvoiceUser
     */
    public function getInvoice()
    {
        return $this->invoice;
    }
}


text:
/**
 * @file DG_Element_2d.h
 * @Synopsis  This is the header file for the class which defines the DG_Element_2d class. This class contains all the
 * declarations which are necessary for defining a general 2d element. This class defines all the necessities for a
 * structured 2d DG element.
 * @author Kaushik Kulkarni
 * @version 1.0
 * @date 2017-02-18
 */

/* Copyright (c) 2016, Shivasubramanian Gopalakrishnan and Kaushik Kulkarni.
  All rights reserved.

   Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

     -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
     -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  **AS IS** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */

#ifndef DG_ELEMENT_2D_H_
#define DG_ELEMENT_2D_H_

#include <map>
#include <string>
#include <vector>
#include <functional>
#include <iostream>
#include <cblas.h>

using namespace std;

class DG_Element_2d {
private:

    int N; /// This represents the order of polynomial interpolation which is done while solving the DG equations.
    double x_start, x_end, y_start, y_end; /// Since, this is a structured rectangular element. These variables define the position and size of the element.
    double* massMatrix;
    double* derivativeMatrix_x; /// This is the matrix which is laid out in 1-D, this would help us to find t    he $\frac{d}{dx}$ of any term.
    double* derivativeMatrix_y; /// This is the matrix which is laid out in 1-D, this would help us to find t    he $\frac{d}{dy}$ of any term.
    double* fluxMatrix_top; /// This is the flux matrix for the top edge.
    double* fluxMatrix_right; // The Flux Matrix for the right edge.
    double* fluxMatrix_bottom; /// This would be the flux term for the the bottom edge.
    double* fluxMatrix_left; /// The Flux matrix for the left edge.
    double* inverseMassMatrix; /// The inverse of the mass matrix is also created only once in the field function. And just passed to each element.

    DG_Element_2d* topNeighbor;
    DG_Element_2d* rightNeighbor;
    DG_Element_2d* leftNeighbor;
    DG_Element_2d* bottomNeighbor;

public:

    double *X, *Y;
    map<string, double*> variable; /// This is the map which would contain all the variable that are needed by the problem.

    map<string, double**> boundaryTop;
    map<string, double**> boundaryRight;
    map<string, double**> boundaryLeft;
    map<string, double**> boundaryBottom;

    map<string, double**> neighboringTop;
    map<string, double**> neighboringRight;
    map<string, double**> neighboringBottom;
    map<string, double**> neighboringLeft;

    vector<string> boundaryVariables; /// This is the variable which stores the name of all the variables whose boundary and neighboring points are stored.

    DG_Element_2d(int _N, double x1, double y1, double x2, double y2);
    void addVariable_withBoundary(string v);
    void addVariable_withoutBoundary(string v);
    void initializeVariable(string v, function<double(double, double)> f);
    void setNeighboringElement(char type, DG_Element_2d* neighbor );
    void setVariableNeighbors(string v);

    // Functions for various operations on the variables.
    void delByDelX(string v, string vDash, string fluxType, string fluxVariable);

    void delByDelY(string v, string vDash, string fluxType, string fluxVariable);

    // Functions to set the various operator matrices.
    void setMassMatrix(double* m);
    void setInverseMassMatrix(double* im);
    void setderivateMatrix_x(double* d);
    void setderivateMatrix_y(double* d);
    void setTopFluxMatrix(double* f);
    void setRightFluxMatrix(double* f);
    void setLeftFluxMatrix(double* f);
    void setBottomFluxMatrix(double* f);

    // Functions to apply linear operations on the variables.
    void axpy(double a, string x, string y);
    void scal(double a, string x);
    void setFunctionsForVariables(string x, string y, function<double(double, double)>, string z);
    void setFunctionsForVariables(string w, string x, string y, function<double(double, double, double)>, string z);

    // Functions to do various other operations on the elements.
    double l2Norm(string v1, string v2);

};

#endif


text:
package com.hackerrank.java.oop;

class Sports {
	String getName() {
		return "Generic Sports";
	}

	void getNumberOfTeamMembers() {
		System.out.printf("Each team has n players in %s%n", getName());
	}
}

class Soccer extends Sports {
	@Override
	String getName() {
		return "Soccer Class";
	}

	@Override
	void getNumberOfTeamMembers() {
		System.out.printf("Each team has 11 players in %s%n", getName());
	}
}

public class MethodOverriding {
	public static void main(String[] args) {
		Sports generalSports = new Sports();
		Soccer soccer = new Soccer();

		System.out.println(generalSports.getName());
		generalSports.getNumberOfTeamMembers();

		System.out.println(soccer.getName());
		soccer.getNumberOfTeamMembers();
	}
}


text:
/* eslint-env jest */

'use strict';

declare var jest: any;

const React = require('React');
const View = require('View');

const requireNativeComponent = require('requireNativeComponent');

const RCTScrollView = requireNativeComponent('RCTScrollView');

const ScrollViewComponent = jest.genMockFromModule('ScrollView');

class ScrollViewMock extends ScrollViewComponent {
  render() {
    return (
      <RCTScrollView {...this.props}>
        {this.props.refreshControl}
        <View>
          {this.props.children}
        </View>
      </RCTScrollView>
    );
  }
}

module.exports = ScrollViewMock;


text:
<?xml version="1.0"?>
<skillsets class="PMA08">
  <skillset id="PMASS00001" title="Confined space work team">
    <units>
      <unit id="MSAPMOHS200A" title="Work safely"/>
      <unit id="MSAPMPER200C" title="Work in accordance with an issued permit"/>
      <unit id="MSAPMPER202A" title="Observe permit work"/>
      <unit id="MSAPMPER205C" title="Enter confined space"/>
    </units>
  </skillset>
  <skillset id="PMASS00002" title="Contractor induction">
    <units>
      <unit id="MSAPMOHS200A" title="Work safely"/>
      <unit id="MSAPMPER200C" title="Work in accordance with an issued permit"/>
    </units>
  </skillset>
  <skillset id="PMASS00003" title="Emergency centre team">
    <units>
      <unit id="PMAOMIR317B" title="Facilitate search and rescue operations"/>
      <unit id="PMAOMIR320B" title="Manage incident response information"/>
      <unit id="PMAOMIR424B" title="Develop and maintain community relationships"/>
      <unit id="PMAOMIR449B" title="Monitor legal compliance obligations during incidents"/>
      <unit id="PMAOMIR523B" title="Manage corporate media requirements in a crisis"/>
      <unit id="PMAOMIR575B" title="Coordinate welfare support activities in response to an incident"/>
    </units>
  </skillset>
  <skillset id="PMASS00004" title="Hot work observer">
    <units>
      <unit id="MSAPMOHS200A" title="Work safely"/>
      <unit id="MSAPMOHS212A" title="Undertake first response to fire incidents"/>
      <unit id="MSAPMPER200C" title="Work in accordance with an issued permit"/>
      <unit id="MSAPMPER202A" title="Observe permit work"/>
    </units>
  </skillset>
  <skillset id="PMASS00005" title="Incident response commander">
    <units>
      <unit id="PMAOHS310B" title="Investigate incidents"/>
      <unit id="PMAOHS511A" title="Manage emergency incidents"/>
      <unit id="PMAOMIR320B" title="Manage incident response information"/>
      <unit id="PMAOMIR418B" title="Coordinate incident response"/>
      <unit id="PMAOMIR444B" title="Develop incident containment tactics"/>
    </units>
  </skillset>
  <skillset id="PMASS00006" title="Incident response team leader">
    <units>
      <unit id="PMAOHS311B" title="Lead emergency teams"/>
      <unit id="PMAOMIR317B" title="Facilitate search and rescue operations"/>
      <unit id="PMAOMIR320B" title="Manage incident response information"/>
      <unit id="PMAOMIR346B" title="Assess and secure an incident site"/>
    </units>
  </skillset>
  <skillset id="PMASS00007" title="Incident response team member">
    <units>
      <unit id="MSAPMOHS205A" title="Control minor incidents"/>
      <unit id="MSAPMOHS210B" title="Undertake first response to non-fire incidents"/>
      <unit id="MSAPMOHS212A" title="Undertake first response to fire incidents"/>
      <unit id="MSAPMOHS216A" title="Operate breathing apparatus"/>
      <unit id="PMAOHS213B" title="Undertake fire control and emergency rescue"/>
      <unit id="PMAOMIR301B" title="Undertake initial rescue"/>
    </units>
  </skillset>
  <skillset id="PMASS00008" title="Offshore crane driver">
    <units>
      <unit id="MSAPMSUP205A" title="Transfer loads"/>
      <unit id="PMASUP237B" title="Undertake crane, dogging and load transfer operations"/>
      <unit id="PMASUP305A" title="Operate offshore cranes"/>
    </units>
  </skillset>
  <skillset id="PMASS00009" title="Offshore incident response team member">
    <units>
      <unit id="MSAPMOHS205A" title="Control minor incidents"/>
      <unit id="MSAPMOHS210B" title="Undertake first response to non-fire incidents"/>
      <unit id="MSAPMOHS212A" title="Undertake first response to fire incidents"/>
      <unit id="MSAPMOHS216A" title="Operate breathing apparatus"/>
      <unit id="PMAOHS213B" title="Undertake fire control and emergency rescue"/>
      <unit id="PMAOMIR301B" title="Undertake initial rescue"/>
      <unit id="PMAOMIR302B" title="Respond to a helideck incident"/>
    </units>
  </skillset>
  <skillset id="PMASS00010" title="Offshore operator safety induction">
    <units>
      <unit id="MSAPMOHS110A" title="Follow emergency response procedures"/>
      <unit id="MSAPMOHS200A" title="Work safely"/>
      <unit id="MSAPMOHS205A" title="Control minor incidents"/>
    </units>
  </skillset>
  <skillset id="PMASS00011" title="Pipeline transmission">
    <units>
      <unit id="PMAOPS221B" title="Operate and monitor prime movers"/>
      <unit id="PMAOPS222B" title="Operate and monitor pumping systems and equipment"/>
      <unit id="PMAOPS223B" title="Operate and monitor valve systems"/>
      <unit id="PMAOPS230B" title="Monitor, operate and maintain pipeline stations and equipment"/>
    </units>
  </skillset>
  <skillset id="PMASS00012" title="Workplace assessor">
    <units>
      <unit id="TAEASS401B" title="Plan assessment activities and processes"/>
      <unit id="TAEASS402B" title="Assess competence"/>
      <unit id="TAEASS403B" title="Participate in assessment validation"/>
    </units>
  </skillset>
</skillsets>


text:
using System;

namespace SonarManager
{
    public class PositionalDistanceEventArgs : EventArgs
    {
        public int Angle { get; internal set; }
        public double Proximity { get; internal set; }
        public double RawValue { get; internal set; }
    }
}