text:
package com.sun.corba.se.impl.logging ;

import java.util.logging.Logger ;
import java.util.logging.Level ;

import org.omg.CORBA.OMGVMCID ;
import com.sun.corba.se.impl.util.SUNVMCID ;
import org.omg.CORBA.CompletionStatus ;
import org.omg.CORBA.SystemException ;

import com.sun.corba.se.spi.orb.ORB ;

import com.sun.corba.se.spi.logging.LogWrapperFactory;

import com.sun.corba.se.spi.logging.LogWrapperBase;

import org.omg.CORBA.INTERNAL ;
import org.omg.CORBA.BAD_OPERATION ;
import org.omg.CORBA.BAD_PARAM ;
import org.omg.CORBA.INV_OBJREF ;

public class IORSystemException extends LogWrapperBase {

    public IORSystemException( Logger logger )
    {
        super( logger ) ;
    }

    private static LogWrapperFactory factory = new LogWrapperFactory() {
        public LogWrapperBase create( Logger logger )
        {
            return new IORSystemException( logger ) ;
        }
    } ;

    public static IORSystemException get( ORB orb, String logDomain )
    {
        IORSystemException wrapper =
            (IORSystemException) orb.getLogWrapper( logDomain,
                "IOR", factory ) ;
        return wrapper ;
    }

    public static IORSystemException get( String logDomain )
    {
        IORSystemException wrapper =
            (IORSystemException) ORB.staticGetLogWrapper( logDomain,
                "IOR", factory ) ;
        return wrapper ;
    }

    ///////////////////////////////////////////////////////////
    // INTERNAL
    ///////////////////////////////////////////////////////////

    public static final int ORT_NOT_INITIALIZED = SUNVMCID.value + 1201 ;

    public INTERNAL ortNotInitialized( CompletionStatus cs, Throwable t ) {
        INTERNAL exc = new INTERNAL( ORT_NOT_INITIALIZED, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.ortNotInitialized",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public INTERNAL ortNotInitialized( CompletionStatus cs ) {
        return ortNotInitialized( cs, null  ) ;
    }

    public INTERNAL ortNotInitialized( Throwable t ) {
        return ortNotInitialized( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public INTERNAL ortNotInitialized(  ) {
        return ortNotInitialized( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    public static final int NULL_POA = SUNVMCID.value + 1202 ;

    public INTERNAL nullPoa( CompletionStatus cs, Throwable t ) {
        INTERNAL exc = new INTERNAL( NULL_POA, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.nullPoa",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public INTERNAL nullPoa( CompletionStatus cs ) {
        return nullPoa( cs, null  ) ;
    }

    public INTERNAL nullPoa( Throwable t ) {
        return nullPoa( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public INTERNAL nullPoa(  ) {
        return nullPoa( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    public static final int BAD_MAGIC = SUNVMCID.value + 1203 ;

    public INTERNAL badMagic( CompletionStatus cs, Throwable t, Object arg0) {
        INTERNAL exc = new INTERNAL( BAD_MAGIC, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = new Object[1] ;
            parameters[0] = arg0 ;
            doLog( Level.WARNING, "IOR.badMagic",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public INTERNAL badMagic( CompletionStatus cs, Object arg0) {
        return badMagic( cs, null, arg0 ) ;
    }

    public INTERNAL badMagic( Throwable t, Object arg0) {
        return badMagic( CompletionStatus.COMPLETED_NO, t, arg0 ) ;
    }

    public INTERNAL badMagic(  Object arg0) {
        return badMagic( CompletionStatus.COMPLETED_NO, null, arg0 ) ;
    }

    public static final int STRINGIFY_WRITE_ERROR = SUNVMCID.value + 1204 ;

    public INTERNAL stringifyWriteError( CompletionStatus cs, Throwable t ) {
        INTERNAL exc = new INTERNAL( STRINGIFY_WRITE_ERROR, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.stringifyWriteError",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public INTERNAL stringifyWriteError( CompletionStatus cs ) {
        return stringifyWriteError( cs, null  ) ;
    }

    public INTERNAL stringifyWriteError( Throwable t ) {
        return stringifyWriteError( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public INTERNAL stringifyWriteError(  ) {
        return stringifyWriteError( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    public static final int TAGGED_PROFILE_TEMPLATE_FACTORY_NOT_FOUND = SUNVMCID.value + 1205 ;

    public INTERNAL taggedProfileTemplateFactoryNotFound( CompletionStatus cs, Throwable t, Object arg0) {
        INTERNAL exc = new INTERNAL( TAGGED_PROFILE_TEMPLATE_FACTORY_NOT_FOUND, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = new Object[1] ;
            parameters[0] = arg0 ;
            doLog( Level.WARNING, "IOR.taggedProfileTemplateFactoryNotFound",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public INTERNAL taggedProfileTemplateFactoryNotFound( CompletionStatus cs, Object arg0) {
        return taggedProfileTemplateFactoryNotFound( cs, null, arg0 ) ;
    }

    public INTERNAL taggedProfileTemplateFactoryNotFound( Throwable t, Object arg0) {
        return taggedProfileTemplateFactoryNotFound( CompletionStatus.COMPLETED_NO, t, arg0 ) ;
    }

    public INTERNAL taggedProfileTemplateFactoryNotFound(  Object arg0) {
        return taggedProfileTemplateFactoryNotFound( CompletionStatus.COMPLETED_NO, null, arg0 ) ;
    }

    public static final int INVALID_JDK1_3_1_PATCH_LEVEL = SUNVMCID.value + 1206 ;

    public INTERNAL invalidJdk131PatchLevel( CompletionStatus cs, Throwable t, Object arg0) {
        INTERNAL exc = new INTERNAL( INVALID_JDK1_3_1_PATCH_LEVEL, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = new Object[1] ;
            parameters[0] = arg0 ;
            doLog( Level.WARNING, "IOR.invalidJdk131PatchLevel",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public INTERNAL invalidJdk131PatchLevel( CompletionStatus cs, Object arg0) {
        return invalidJdk131PatchLevel( cs, null, arg0 ) ;
    }

    public INTERNAL invalidJdk131PatchLevel( Throwable t, Object arg0) {
        return invalidJdk131PatchLevel( CompletionStatus.COMPLETED_NO, t, arg0 ) ;
    }

    public INTERNAL invalidJdk131PatchLevel(  Object arg0) {
        return invalidJdk131PatchLevel( CompletionStatus.COMPLETED_NO, null, arg0 ) ;
    }

    public static final int GET_LOCAL_SERVANT_FAILURE = SUNVMCID.value + 1207 ;

    public INTERNAL getLocalServantFailure( CompletionStatus cs, Throwable t, Object arg0) {
        INTERNAL exc = new INTERNAL( GET_LOCAL_SERVANT_FAILURE, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.FINE )) {
            Object[] parameters = new Object[1] ;
            parameters[0] = arg0 ;
            doLog( Level.FINE, "IOR.getLocalServantFailure",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public INTERNAL getLocalServantFailure( CompletionStatus cs, Object arg0) {
        return getLocalServantFailure( cs, null, arg0 ) ;
    }

    public INTERNAL getLocalServantFailure( Throwable t, Object arg0) {
        return getLocalServantFailure( CompletionStatus.COMPLETED_NO, t, arg0 ) ;
    }

    public INTERNAL getLocalServantFailure(  Object arg0) {
        return getLocalServantFailure( CompletionStatus.COMPLETED_NO, null, arg0 ) ;
    }

    ///////////////////////////////////////////////////////////
    // BAD_OPERATION
    ///////////////////////////////////////////////////////////

    public static final int ADAPTER_ID_NOT_AVAILABLE = SUNVMCID.value + 1201 ;

    public BAD_OPERATION adapterIdNotAvailable( CompletionStatus cs, Throwable t ) {
        BAD_OPERATION exc = new BAD_OPERATION( ADAPTER_ID_NOT_AVAILABLE, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.adapterIdNotAvailable",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public BAD_OPERATION adapterIdNotAvailable( CompletionStatus cs ) {
        return adapterIdNotAvailable( cs, null  ) ;
    }

    public BAD_OPERATION adapterIdNotAvailable( Throwable t ) {
        return adapterIdNotAvailable( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public BAD_OPERATION adapterIdNotAvailable(  ) {
        return adapterIdNotAvailable( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    public static final int SERVER_ID_NOT_AVAILABLE = SUNVMCID.value + 1202 ;

    public BAD_OPERATION serverIdNotAvailable( CompletionStatus cs, Throwable t ) {
        BAD_OPERATION exc = new BAD_OPERATION( SERVER_ID_NOT_AVAILABLE, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.serverIdNotAvailable",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public BAD_OPERATION serverIdNotAvailable( CompletionStatus cs ) {
        return serverIdNotAvailable( cs, null  ) ;
    }

    public BAD_OPERATION serverIdNotAvailable( Throwable t ) {
        return serverIdNotAvailable( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public BAD_OPERATION serverIdNotAvailable(  ) {
        return serverIdNotAvailable( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    public static final int ORB_ID_NOT_AVAILABLE = SUNVMCID.value + 1203 ;

    public BAD_OPERATION orbIdNotAvailable( CompletionStatus cs, Throwable t ) {
        BAD_OPERATION exc = new BAD_OPERATION( ORB_ID_NOT_AVAILABLE, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.orbIdNotAvailable",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public BAD_OPERATION orbIdNotAvailable( CompletionStatus cs ) {
        return orbIdNotAvailable( cs, null  ) ;
    }

    public BAD_OPERATION orbIdNotAvailable( Throwable t ) {
        return orbIdNotAvailable( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public BAD_OPERATION orbIdNotAvailable(  ) {
        return orbIdNotAvailable( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    public static final int OBJECT_ADAPTER_ID_NOT_AVAILABLE = SUNVMCID.value + 1204 ;

    public BAD_OPERATION objectAdapterIdNotAvailable( CompletionStatus cs, Throwable t ) {
        BAD_OPERATION exc = new BAD_OPERATION( OBJECT_ADAPTER_ID_NOT_AVAILABLE, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.objectAdapterIdNotAvailable",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public BAD_OPERATION objectAdapterIdNotAvailable( CompletionStatus cs ) {
        return objectAdapterIdNotAvailable( cs, null  ) ;
    }

    public BAD_OPERATION objectAdapterIdNotAvailable( Throwable t ) {
        return objectAdapterIdNotAvailable( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public BAD_OPERATION objectAdapterIdNotAvailable(  ) {
        return objectAdapterIdNotAvailable( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    ///////////////////////////////////////////////////////////
    // BAD_PARAM
    ///////////////////////////////////////////////////////////

    public static final int BAD_OID_IN_IOR_TEMPLATE_LIST = SUNVMCID.value + 1201 ;

    public BAD_PARAM badOidInIorTemplateList( CompletionStatus cs, Throwable t ) {
        BAD_PARAM exc = new BAD_PARAM( BAD_OID_IN_IOR_TEMPLATE_LIST, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.badOidInIorTemplateList",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public BAD_PARAM badOidInIorTemplateList( CompletionStatus cs ) {
        return badOidInIorTemplateList( cs, null  ) ;
    }

    public BAD_PARAM badOidInIorTemplateList( Throwable t ) {
        return badOidInIorTemplateList( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public BAD_PARAM badOidInIorTemplateList(  ) {
        return badOidInIorTemplateList( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    public static final int INVALID_TAGGED_PROFILE = SUNVMCID.value + 1202 ;

    public BAD_PARAM invalidTaggedProfile( CompletionStatus cs, Throwable t ) {
        BAD_PARAM exc = new BAD_PARAM( INVALID_TAGGED_PROFILE, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.invalidTaggedProfile",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public BAD_PARAM invalidTaggedProfile( CompletionStatus cs ) {
        return invalidTaggedProfile( cs, null  ) ;
    }

    public BAD_PARAM invalidTaggedProfile( Throwable t ) {
        return invalidTaggedProfile( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public BAD_PARAM invalidTaggedProfile(  ) {
        return invalidTaggedProfile( CompletionStatus.COMPLETED_NO, null  ) ;
    }

    public static final int BAD_IIOP_ADDRESS_PORT = SUNVMCID.value + 1203 ;

    public BAD_PARAM badIiopAddressPort( CompletionStatus cs, Throwable t, Object arg0) {
        BAD_PARAM exc = new BAD_PARAM( BAD_IIOP_ADDRESS_PORT, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = new Object[1] ;
            parameters[0] = arg0 ;
            doLog( Level.WARNING, "IOR.badIiopAddressPort",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public BAD_PARAM badIiopAddressPort( CompletionStatus cs, Object arg0) {
        return badIiopAddressPort( cs, null, arg0 ) ;
    }

    public BAD_PARAM badIiopAddressPort( Throwable t, Object arg0) {
        return badIiopAddressPort( CompletionStatus.COMPLETED_NO, t, arg0 ) ;
    }

    public BAD_PARAM badIiopAddressPort(  Object arg0) {
        return badIiopAddressPort( CompletionStatus.COMPLETED_NO, null, arg0 ) ;
    }

    ///////////////////////////////////////////////////////////
    // INV_OBJREF
    ///////////////////////////////////////////////////////////

    public static final int IOR_MUST_HAVE_IIOP_PROFILE = SUNVMCID.value + 1201 ;

    public INV_OBJREF iorMustHaveIiopProfile( CompletionStatus cs, Throwable t ) {
        INV_OBJREF exc = new INV_OBJREF( IOR_MUST_HAVE_IIOP_PROFILE, cs ) ;
        if (t != null)
            exc.initCause( t ) ;

        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "IOR.iorMustHaveIiopProfile",
                parameters, IORSystemException.class, exc ) ;
        }

        return exc ;
    }

    public INV_OBJREF iorMustHaveIiopProfile( CompletionStatus cs ) {
        return iorMustHaveIiopProfile( cs, null  ) ;
    }

    public INV_OBJREF iorMustHaveIiopProfile( Throwable t ) {
        return iorMustHaveIiopProfile( CompletionStatus.COMPLETED_NO, t  ) ;
    }

    public INV_OBJREF iorMustHaveIiopProfile(  ) {
        return iorMustHaveIiopProfile( CompletionStatus.COMPLETED_NO, null  ) ;
    }

}


text:
import type { ConfigurationData } from '../../types'

export interface ConfigureProps {
  canPersistContextData: boolean
  configurationData: ConfigurationData
  updateConfigurationData(
    configurationData: ConfigurationData
  ): Promise<boolean>
}

redpajama_set_name: RedPajamaGithub


text:
<html>
  <head>
    <title>Sample App</title>
    <link rel="stylesheet" href="../react-object-inspector.css">
  </head>
  <body>
    <div id='root'>
    </div>
    <script src="/static/bundle.js"></script>
  </body>
</html>


text:
package de.tum.in.schlichter.shoprx.algorithm.model;

import java.math.BigDecimal;
import java.util.Arrays;

import de.tum.in.schlichter.shoprx.Explanations.Model.Explanation;
import de.tum.in.schlichter.shoprx.context.model.ItemSelectedContext;

/**
 * Represents a item (e.g. clothing item), or one case in the case-base.
 */
public class Item {

    private int id;

    private String name;

    private BigDecimal price;

    private String image_url;

    private int shop_id;

    private Attributes attrs;

    private double querySimilarity;

    private double quality;

    private Sex sex;

    private boolean isTrendy;

    private double proximityToStereotype;

    private int mItemsInStock;

    private ItemSelectedContext mItemContext;

    private double mDistanceToContext;//Stores the calculated distance between the context and the item

    private int mTimesSelected; // How often was this item part of a context?

    private double mTemporaryQuality;

    private String[] mNameParts;

    private Explanation explanation;

    private boolean inFashion;

    public int id() {
        return id;
    }

    public Item id(int id) {
        explanation = new Explanation();
        this.id = id;
        return this;
    }

    public Explanation getExplanation(){
        return explanation;
    }
    public void setExplanation(Explanation explanation){
        this.explanation = explanation;
    }

    public String name() {
        return name;
    }

    public Item name(String name) {
        explanation = new Explanation();
        this.name = name;

        mNameParts = name.split("-");
        for (int i = 0; i < mNameParts.length; i++){
            mNameParts[i] = mNameParts[i].trim().toLowerCase();
            if (mNameParts[i].length() > 1) {
                mNameParts[i] = Character.toUpperCase(mNameParts[i].charAt(0)) + mNameParts[i].substring(1);
            } else {
                mNameParts[i] = "";
            }
        }

        return this;
    }

    /**
     * Gets an array with the parts of the name (strings that are part of the description)
     * @return an array with the parts of the name.
     */
    public String[] getNameParts(){
        String[] strings = Arrays.copyOf(mNameParts, mNameParts.length + 1);
        strings[strings.length -1 ] = attributes().getAttributeById(Color.ID).currentValue().descriptor();

        return strings;
    }

    public BigDecimal price() {
        return price;
    }

    public Item price(BigDecimal price) {
        explanation = new Explanation();
        this.price = price;
        return this;
    }

    public boolean isInFashion() {
        return inFashion;
    }

    public void setInFashion(boolean inFashion) {
        this.inFashion = inFashion;
    }

    public String image() {
        return image_url;
    }

    public Item image(String image_url) {
        explanation = new Explanation();
        this.image_url = image_url;
        return this;
    }

    public int shopId() {
        return shop_id;
    }

    public Item shopId(int shop_id) {
        this.shop_id = shop_id;
        return this;
    }

    public Attributes attributes() {
        return attrs;
    }

    public Item attributes(Attributes attrs) {
        explanation = new Explanation();
        this.attrs = attrs;
        return this;
    }

    public double querySimilarity() {
        return querySimilarity;
    }

    public Item querySimilarity(double querySimilarity) {
        this.querySimilarity = querySimilarity;
        return this;
    }

    public double quality() {
        return quality;
    }

    public Item quality(double quality) {
        explanation = new Explanation();
        this.quality = quality;
        return this;
    }

    public void setTrendy(boolean isTrendy){
        this.isTrendy = isTrendy;
    }

    public boolean isTrendy(){return isTrendy;}

    public void setSex(Sex sex){
        this.sex = sex;
    }

    public Sex getSex(){
        return sex;
    }

    /**
     * Gets the proximity to the stereotype, meaning how similar this item and the stereotype are.
     * @return the proximity based on a previous calculation
     */
    public double getProximityToStereotype() {
        return proximityToStereotype;
    }

    /**
     * Sets the proximity to a stereotype of the user.
     * @param proximityToStereotype the proximity to the stereotype
     */
    public void setProximityToStereotype(double proximityToStereotype) {
        this.proximityToStereotype = proximityToStereotype;
    }

    /**
     * Method that sets the amount of items that are currently available in the given shop.
     * @param numberOfItems the number of items in stock.
     */
    public void setItemsInStock(int numberOfItems){
        mItemsInStock = numberOfItems;
    }

    public int getItemsInStock(){
        return mItemsInStock;
    }

    /**
     * Gets the context object, that states in which contexts the item has been selected how often.
     * @return The context object.
     */
    public ItemSelectedContext getItemContext() {
        return mItemContext;
    }

    /**
     * Sets a new Context Object which states in which contexts the item has been selected how often.
     * @param itemContext An item Context object that contains information about in which contexts the given item has been selected.
     */
    public void setItemContext(ItemSelectedContext itemContext) {
        this.mItemContext = itemContext;
    }

    /**
     * Get the distance to the active scenario context.
     * @return the distance
     */
    public double getDistanceToContext() {
        return mDistanceToContext;
    }

    /**
     * Sets the calculated distance to the currently active scenario.
     * @param mDistanceToContext the calculated distance
     */
    public void setDistanceToContext(double mDistanceToContext) {
        this.mDistanceToContext = mDistanceToContext;
    }

    /**
     * Get how often this item was selected in ANY context
     * @return times Selected.
     */
    public int getTimesSelected() {
        return mTimesSelected;
    }

    /**
     * Set how many times this item was selected in any context.
     * @param mTimesSelected how many times was the item selected.
     */
    public void setTimesSelected(int mTimesSelected) {
        this.mTimesSelected = mTimesSelected;
    }

    @Override
    public String toString() {
        return "Item{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex=" + sex.currentValue() +
                '}';
    }

    /**
     * This method sets a temporary parameter used in the calculation of the bounded greedy algorithm.
     * @param i the similarity
     */
    public void setTemporaryQuality(double i) {
        mTemporaryQuality = i;
    }

    /**
     * Gets the temporarily stored value.
     * @return the similarity for this recommendation cycle
     */
    public double getTemporaryQuality(){
        return mTemporaryQuality;
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Lichenologist 24(2): 160 (1992)

#### Original name
Lecidea pycnocarpa f. sorediata Coppins & Fryday

### Remarks
null


text:
ALTER TABLE v5_1_candidates DROP COLUMN sequence_order;

ALTER TABLE v5_1_ballot_selections ADD COLUMN sequence_order TEXT;

ALTER TABLE v5_1_contact_information
  ADD COLUMN directions TEXT,
  ADD COLUMN lat TEXT,
  ADD COLUMN lng TEXT;

ALTER TABLE v5_1_people ADD COLUMN gender TEXT;

ALTER TABLE v5_1_ballot_styles RENAME COLUMN ordered_contest_id TO ordered_contest_ids;
ALTER TABLE v5_1_candidate_contests RENAME COLUMN office_id TO office_ids;
ALTER TABLE v5_1_candidate_contests RENAME COLUMN primary_party_id TO primary_party_ids;
ALTER TABLE v5_1_offices RENAME COLUMN office_holder_person_id TO office_holder_person_ids;

-- IDREF becomes IDREFS, and we can drop some join tables
ALTER TABLE v5_1_localities ADD COLUMN polling_location_ids TEXT;
ALTER TABLE v5_1_states ADD COLUMN polling_location_ids TEXT;
ALTER TABLE v5_1_candidate_contests ADD COLUMN ballot_selection_ids TEXT;
ALTER TABLE v5_1_precincts
  ADD COLUMN electoral_district_ids TEXT,
  ADD COLUMN polling_location_ids TEXT;

DROP TABLE v5_1_candidate_contest_ballot_selections;
DROP TABLE v5_1_precinct_electoral_districts;
DROP TABLE v5_1_precinct_polling_locations;
DROP TABLE v5_1_locality_polling_locations;
DROP TABLE v5_1_state_polling_locations;


text:
package ns

/**
* Configuration for limit Indetifier resource.
*/
type Nslimitidentifier struct {
	/**
	* Name for a rate limit identifier. Must begin with an ASCII letter or underscore (_) character, and must consist only of ASCII alphanumeric or underscore characters. Reserved words must not be used.
	*/
	Limitidentifier string `json:"limitidentifier,omitempty"`
	/**
	* Maximum number of requests that are allowed in the given timeslice when requests (mode is set as REQUEST_RATE) are tracked per timeslice.
		When connections (mode is set as CONNECTION) are tracked, it is the total number of connections that would be let through.
	*/
	Threshold int `json:"threshold,omitempty"`
	/**
	* Time interval, in milliseconds, specified in multiples of 10, during which requests are tracked to check if they cross the threshold. This argument is needed only when the mode is set to REQUEST_RATE.
	*/
	Timeslice int `json:"timeslice,omitempty"`
	/**
	* Defines the type of traffic to be tracked.
		* REQUEST_RATE - Tracks requests/timeslice.
		* CONNECTION - Tracks active transactions.
		Examples
		1. To permit 20 requests in 10 ms and 2 traps in 10 ms:
		add limitidentifier limit_req -mode request_rate -limitType smooth -timeslice 1000 -Threshold 2000 -trapsInTimeSlice 200
		2. To permit 50 requests in 10 ms:
		set  limitidentifier limit_req -mode request_rate -timeslice 1000 -Threshold 5000 -limitType smooth
		3. To permit 1 request in 40 ms:
		set limitidentifier limit_req -mode request_rate -timeslice 2000 -Threshold 50 -limitType smooth
		4. To permit 1 request in 200 ms and 1 trap in 130 ms:
		set limitidentifier limit_req -mode request_rate -timeslice 1000 -Threshold 5 -limitType smooth -trapsInTimeSlice 8
		5. To permit 5000 requests in 1000 ms and 200 traps in 1000 ms:
		set limitidentifier limit_req  -mode request_rate -timeslice 1000 -Threshold 5000 -limitType BURSTY
	*/
	Mode string `json:"mode,omitempty"`
	/**
	* Smooth or bursty request type.
		* SMOOTH - When you want the permitted number of requests in a given interval of time to be spread evenly across the timeslice
		* BURSTY - When you want the permitted number of requests to exhaust the quota anytime within the timeslice.
		This argument is needed only when the mode is set to REQUEST_RATE.
	*/
	Limittype string `json:"limittype,omitempty"`
	/**
	* Name of the rate limit selector. If this argument is NULL, rate limiting will be applied on all traffic received by the virtual server or the Citrix ADC (depending on whether the limit identifier is bound to a virtual server or globally) without any filtering.
	*/
	Selectorname string `json:"selectorname,omitempty"`
	/**
	* Maximum bandwidth permitted, in kbps.
	*/
	Maxbandwidth int `json:"maxbandwidth,omitempty"`
	/**
	* Number of traps to be sent in the timeslice configured. A value of 0 indicates that traps are disabled.
	*/
	Trapsintimeslice int `json:"trapsintimeslice,omitempty"`

	//------- Read only Parameter ---------;

	Ngname string `json:"ngname,omitempty"`
	Hits string `json:"hits,omitempty"`
	Drop string `json:"drop,omitempty"`
	Rule string `json:"rule,omitempty"`
	Time string `json:"time,omitempty"`
	Total string `json:"total,omitempty"`
	Trapscomputedintimeslice string `json:"trapscomputedintimeslice,omitempty"`
	Computedtraptimeslice string `json:"computedtraptimeslice,omitempty"`
	Referencecount string `json:"referencecount,omitempty"`

}


text:
package com.epam.catgenome.controller.vo;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.epam.catgenome.entity.BiologicalDataItemFormat;
import com.epam.catgenome.entity.BiologicalDataItemResourceType;
import com.epam.catgenome.entity.vcf.VcfSample;
import lombok.Data;

/**
 * Source:      ProjectItemVO
 * Created:     22.01.16, 15:27
 * Project:     CATGenome Browser
 * Make:        IntelliJ IDEA 14.1.4, JDK 1.8
 *
 * <p>
 * A View Object for simplified representation of ProjectItem entity
 * </p>
 */
@Data
public class ProjectItemVO {
    private Boolean hidden;
    private Short ordinalNumber;

    // BioDataItemProperties
    private Long id;
    private Long bioDataItemId;
    private String name;
    private BiologicalDataItemResourceType type;
    private String path;
    private String source;
    private BiologicalDataItemFormat format;
    private Long createdBy;
    private Date createdDate;
    private String prettyName;

    // FeatureFile properties
    private Long referenceId;
    private Boolean compressed;
    private Boolean multiSample;
    // VCF properties
    private List<VcfSample> samples;
    private Map<String, String> metadata;
    private Integer mask;
}


text:
package com.github.ilyamurzinov.ecareapp.dao;

import com.github.ilyamurzinov.ecareapp.domain.Option;
import org.springframework.stereotype.Repository;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import java.util.List;

/**
 * @author ilya-murzinov
 */
@Repository
public class OptionDAOImpl implements OptionDAO {
    @PersistenceContext
    private EntityManager entityManager;

    @Override
    public Option getOption(int id) {
        Query query = entityManager.createQuery("select o from Option o where o.id = :id")
                .setParameter("id", id);
        return (Option) query.getSingleResult();
    }

    @SuppressWarnings("unchecked")
    @Override
    public List<Option> getAllOptions() {
        Query query = entityManager.createQuery("select o from Option o");
        return (List<Option>) query.getResultList();
    }

    @Override
    public void addOption(Option option) {
        entityManager.persist(option);
    }

    @Override
    public void removeOption(int id) {
        entityManager.remove(getOption(id));
    }

    @Override
    public void updateOption(Option option) {
        entityManager.merge(option);
    }
}


text:
namespace Betabit.Lora.Nuget.EventHub.Areas.HelpPage.ModelDescriptions
{
    public class DictionaryModelDescription : KeyValuePairModelDescription
    {
    }
}


text:
<?php

require_once dirname(__FILE__).'/js/administration.general.gui.php';

$widget = (new CWidget())
	->setTitle(_('GUI'))
	->setControls((new CForm())
		->cleanItems()
		->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.gui.php')))
	);

$guiTab = (new CFormList())
	->addRow(_('Default theme'), new CComboBox('default_theme', $data['default_theme'], null, Z::getThemes()))
	->addRow(_('Dropdown first entry'), [
		new CComboBox('dropdown_first_entry', $data['dropdown_first_entry'], null, [
			ZBX_DROPDOWN_FIRST_NONE => _('None'),
			ZBX_DROPDOWN_FIRST_ALL => _('All')
		]),
		(new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN),
		new CLabel([
			(new CCheckBox('dropdown_first_remember'))->setChecked($data['dropdown_first_remember'] == 1),
			_('remember selected')
		], 'dropdown_first_remember')
	])
	->addRow(_('Limit for search and filter results'),
		(new CNumericBox('search_limit', $data['search_limit'], 6))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)
	)
	->addRow(_('Max count of elements to show inside table cell'),
		(new CNumericBox('max_in_table', $data['max_in_table'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)
	)
	->addRow(_('Enable event acknowledgement'),
		(new CCheckBox('event_ack_enable'))->setChecked($data['event_ack_enable'] == 1)
	)
	->addRow(_('Show events not older than (in days)'),
		(new CTextBox('event_expire', $data['event_expire']))->setWidth(ZBX_TEXTAREA_TINY_WIDTH)
	)
	->addRow(_('Max count of events per trigger to show'),
		(new CTextBox('event_show_max', $data['event_show_max']))->setWidth(ZBX_TEXTAREA_TINY_WIDTH)
	)
	->addRow(_('Show warning if Zabbix server is down'),
		(new CCheckBox('server_check_interval', SERVER_CHECK_INTERVAL))
			->setChecked($data['server_check_interval'] == SERVER_CHECK_INTERVAL)
	);

$guiView = (new CTabView())
	->addTab('gui', _('GUI'), $guiTab)
	->setFooter(makeFormFooter(new CSubmit('update', _('Update'))));

$guiForm = (new CForm())
	->addItem($guiView);

$widget->addItem($guiForm);

return $widget;


text:
package org.azolla.p.roc.simditor;

import com.google.common.base.Function;
import com.google.common.collect.Lists;
import org.azolla.p.roc.vo.PostVo;
import org.springframework.stereotype.Service;

import javax.annotation.Nullable;
import java.util.List;

/**
 * The coder is very lazy, nothing to write for this class
 *
 * @author sk@azolla.org
 * @since ADK1.0
 */
@Service
public class Simditor
{
  public static final String MORE = "<more>";

  public static final List<PostVo> more(List<PostVo> lst)
  {
    return Lists.transform(lst, new Function<PostVo, PostVo>()
    {
      @Nullable
      @Override
      public PostVo apply(PostVo input)
      {
        return input.setContent(input.getContent().split(MORE)[0]);
      }
    });
  }
}


text:
Chosen for rails

## Installation

Add this line to your application's Gemfile:

    gem 'chosen_rails'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install chosen_rails

## Usage

Add //= require 'chosen_rails' for application.js and *= require 'chosen_rails' for application.css

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
FROM node:8.2.1-alpine

# Set locale
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Set newman version
ENV NEWMAN_VERSION 3.7.6

# Install newman
RUN npm install -g newman@${NEWMAN_VERSION};

# Set workdir to /etc/newman
# When running the image, mount the directory containing your collection to this location
#
# docker run -v <path to collections directory>:/etc/newman ...
#
# In case you mount your collections directory to a different location, you will need to give absolute paths to any
# collection, environment files you want to pass to newman, and if you want newman reports to be saved to your disk.
# Or you can change the workdir by using the -w or --workdir flag

WORKDIR /etc/newman

# Set newman as the default container command
# Now you can run the container via
#
# docker run -v /home/collections:/etc/newman -t postman/newman_ubuntu1404 -c YourCollection.json.postman_collection \
#                                                                          -e YourEnvironment.postman_environment \
#                                                                          -H newman_report.html

ENTRYPOINT ["newman"]


text:
package org.apache.cassandra.config;

import java.nio.ByteBuffer;
import java.util.*;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.collect.Collections2;

import org.apache.cassandra.cql3.*;
import org.apache.cassandra.cql3.selection.Selectable;
import org.apache.cassandra.cql3.selection.Selector;
import org.apache.cassandra.cql3.selection.SimpleSelector;
import org.apache.cassandra.db.rows.*;
import org.apache.cassandra.db.marshal.*;
import org.apache.cassandra.exceptions.InvalidRequestException;
import org.apache.cassandra.serializers.MarshalException;
import org.apache.cassandra.utils.ByteBufferUtil;

public class ColumnDefinition extends ColumnSpecification implements Selectable, Comparable<ColumnDefinition>
{
    public static final Comparator<Object> asymmetricColumnDataComparator =
        (a, b) -> ((ColumnData) a).column().compareTo((ColumnDefinition) b);

    public static final int NO_POSITION = -1;

    public enum ClusteringOrder
    {
        ASC, DESC, NONE
    }

    /*
     * The type of CQL3 column this definition represents.
     * There is 4 main type of CQL3 columns: those parts of the partition key,
     * those parts of the clustering columns and amongst the others, regular and
     * static ones.
     *
     * Note that thrift only knows about definitions of type REGULAR (and
     * the ones whose position == NO_POSITION (-1)).
     */
    public enum Kind
    {
        // NOTE: if adding a new type, must modify comparisonOrder
        PARTITION_KEY,
        CLUSTERING,
        REGULAR,
        STATIC;

        public boolean isPrimaryKeyKind()
        {
            return this == PARTITION_KEY || this == CLUSTERING;
        }

    }

    public final Kind kind;

    /*
     * If the column is a partition key or clustering column, its position relative to
     * other columns of the same kind. Otherwise,  NO_POSITION (-1).
     *
     * Note that partition key and clustering columns are numbered separately so
     * the first clustering column is 0.
     */
    private final int position;

    private final Comparator<CellPath> cellPathComparator;
    private final Comparator<Object> asymmetricCellPathComparator;
    private final Comparator<? super Cell> cellComparator;

    private int hash;

    /**
     * These objects are compared frequently, so we encode several of their comparison components
     * into a single long value so that this can be done efficiently
     */
    private final long comparisonOrder;

    private static long comparisonOrder(Kind kind, boolean isComplex, long position, ColumnIdentifier name)
    {
        assert position >= 0 && position < 1 << 12;
        return   (((long) kind.ordinal()) << 61)
               | (isComplex ? 1L << 60 : 0)
               | (position << 48)
               | (name.prefixComparison >>> 16);
    }

    public static ColumnDefinition partitionKeyDef(CFMetaData cfm, ByteBuffer name, AbstractType<?> type, int position)
    {
        return new ColumnDefinition(cfm, name, type, position, Kind.PARTITION_KEY);
    }

    public static ColumnDefinition partitionKeyDef(String ksName, String cfName, String name, AbstractType<?> type, int position)
    {
        return new ColumnDefinition(ksName, cfName, ColumnIdentifier.getInterned(name, true), type, position, Kind.PARTITION_KEY);
    }

    public static ColumnDefinition clusteringDef(CFMetaData cfm, ByteBuffer name, AbstractType<?> type, int position)
    {
        return new ColumnDefinition(cfm, name, type, position, Kind.CLUSTERING);
    }

    public static ColumnDefinition clusteringDef(String ksName, String cfName, String name, AbstractType<?> type, int position)
    {
        return new ColumnDefinition(ksName, cfName, ColumnIdentifier.getInterned(name, true),  type, position, Kind.CLUSTERING);
    }

    public static ColumnDefinition regularDef(CFMetaData cfm, ByteBuffer name, AbstractType<?> type)
    {
        return new ColumnDefinition(cfm, name, type, NO_POSITION, Kind.REGULAR);
    }

    public static ColumnDefinition regularDef(String ksName, String cfName, String name, AbstractType<?> type)
    {
        return new ColumnDefinition(ksName, cfName, ColumnIdentifier.getInterned(name, true), type, NO_POSITION, Kind.REGULAR);
    }

    public static ColumnDefinition staticDef(CFMetaData cfm, ByteBuffer name, AbstractType<?> type)
    {
        return new ColumnDefinition(cfm, name, type, NO_POSITION, Kind.STATIC);
    }

    public ColumnDefinition(CFMetaData cfm, ByteBuffer name, AbstractType<?> type, int position, Kind kind)
    {
        this(cfm.ksName,
             cfm.cfName,
             ColumnIdentifier.getInterned(name, cfm.getColumnDefinitionNameComparator(kind)),
             type,
             position,
             kind);
    }

    @VisibleForTesting
    public ColumnDefinition(String ksName,
                            String cfName,
                            ColumnIdentifier name,
                            AbstractType<?> type,
                            int position,
                            Kind kind)
    {
        super(ksName, cfName, name, type);
        assert name != null && type != null && kind != null;
        assert name.isInterned();
        assert (position == NO_POSITION) == !kind.isPrimaryKeyKind(); // The position really only make sense for partition and clustering columns (and those must have one),
                                                                      // so make sure we don't sneak it for something else since it'd breaks equals()
        this.kind = kind;
        this.position = position;
        this.cellPathComparator = makeCellPathComparator(kind, type);
        this.cellComparator = cellPathComparator == null ? ColumnData.comparator : (a, b) -> cellPathComparator.compare(a.path(), b.path());
        this.asymmetricCellPathComparator = cellPathComparator == null ? null : (a, b) -> cellPathComparator.compare(((Cell)a).path(), (CellPath) b);
        this.comparisonOrder = comparisonOrder(kind, isComplex(), Math.max(0, position), name);
    }

    private static Comparator<CellPath> makeCellPathComparator(Kind kind, AbstractType<?> type)
    {
        if (kind.isPrimaryKeyKind() || !type.isMultiCell())
            return null;

        AbstractType<?> nameComparator = type.isCollection()
                                       ? ((CollectionType) type).nameComparator()
                                       : ((UserType) type).nameComparator();

        return new Comparator<CellPath>()
        {
            public int compare(CellPath path1, CellPath path2)
            {
                if (path1.size() == 0 || path2.size() == 0)
                {
                    if (path1 == CellPath.BOTTOM)
                        return path2 == CellPath.BOTTOM ? 0 : -1;
                    if (path1 == CellPath.TOP)
                        return path2 == CellPath.TOP ? 0 : 1;
                    return path2 == CellPath.BOTTOM ? 1 : -1;
                }

                // This will get more complicated once we have non-frozen UDT and nested collections
                assert path1.size() == 1 && path2.size() == 1;
                return nameComparator.compare(path1.get(0), path2.get(0));
            }
        };
    }

    public ColumnDefinition copy()
    {
        return new ColumnDefinition(ksName, cfName, name, type, position, kind);
    }

    public ColumnDefinition withNewName(ColumnIdentifier newName)
    {
        return new ColumnDefinition(ksName, cfName, newName, type, position, kind);
    }

    public ColumnDefinition withNewType(AbstractType<?> newType)
    {
        return new ColumnDefinition(ksName, cfName, name, newType, position, kind);
    }

    public boolean isPartitionKey()
    {
        return kind == Kind.PARTITION_KEY;
    }

    public boolean isClusteringColumn()
    {
        return kind == Kind.CLUSTERING;
    }

    public boolean isStatic()
    {
        return kind == Kind.STATIC;
    }

    public boolean isRegular()
    {
        return kind == Kind.REGULAR;
    }

    public ClusteringOrder clusteringOrder()
    {
        if (!isClusteringColumn())
            return ClusteringOrder.NONE;

        return type.isReversed() ? ClusteringOrder.DESC : ClusteringOrder.ASC;
    }

    public int position()
    {
        return position;
    }

    @Override
    public boolean equals(Object o)
    {
        if (this == o)
            return true;

        if (!(o instanceof ColumnDefinition))
            return false;

        ColumnDefinition cd = (ColumnDefinition) o;

        return Objects.equal(ksName, cd.ksName)
            && Objects.equal(cfName, cd.cfName)
            && Objects.equal(name, cd.name)
            && Objects.equal(type, cd.type)
            && Objects.equal(kind, cd.kind)
            && Objects.equal(position, cd.position);
    }

    @Override
    public int hashCode()
    {
        // This achieves the same as Objects.hashcode, but avoids the object array allocation
        // which features significantly in the allocation profile and caches the result.
        int result = hash;
        if(result == 0)
        {
            result = 31 + (ksName == null ? 0 : ksName.hashCode());
            result = 31 * result + (cfName == null ? 0 : cfName.hashCode());
            result = 31 * result + (name == null ? 0 : name.hashCode());
            result = 31 * result + (type == null ? 0 : type.hashCode());
            result = 31 * result + (kind == null ? 0 : kind.hashCode());
            result = 31 * result + position;
            hash = result;
        }
        return result;
    }

    @Override
    public String toString()
    {
        return name.toString();
    }

    public String debugString()
    {
        return MoreObjects.toStringHelper(this)
                          .add("name", name)
                          .add("type", type)
                          .add("kind", kind)
                          .add("position", position)
                          .toString();
    }

    public boolean isPrimaryKeyColumn()
    {
        return kind.isPrimaryKeyKind();
    }

    /**
     * Whether the name of this definition is serialized in the cell nane, i.e. whether
     * it's not just a non-stored CQL metadata.
     */
    public boolean isPartOfCellName(boolean isCQL3Table, boolean isSuper)
    {
        // When converting CQL3 tables to thrift, any regular or static column ends up in the cell name.
        // When it's a compact table however, the REGULAR definition is the name for the cell value of "dynamic"
        // column (so it's not part of the cell name) and it's static columns that ends up in the cell name.
        if (isCQL3Table)
            return kind == Kind.REGULAR || kind == Kind.STATIC;
        else if (isSuper)
            return kind == Kind.REGULAR;
        else
            return kind == Kind.STATIC;
    }

    /**
     * Converts the specified column definitions into column identifiers.
     *
     * @param definitions the column definitions to convert.
     * @return the column identifiers corresponding to the specified definitions
     */
    public static Collection<ColumnIdentifier> toIdentifiers(Collection<ColumnDefinition> definitions)
    {
        return Collections2.transform(definitions, new Function<ColumnDefinition, ColumnIdentifier>()
        {
            @Override
            public ColumnIdentifier apply(ColumnDefinition columnDef)
            {
                return columnDef.name;
            }
        });
    }

    public int compareTo(ColumnDefinition other)
    {
        if (this == other)
            return 0;

        if (comparisonOrder != other.comparisonOrder)
            return Long.compare(comparisonOrder, other.comparisonOrder);

        return this.name.compareTo(other.name);
    }

    public Comparator<CellPath> cellPathComparator()
    {
        return cellPathComparator;
    }

    public Comparator<Object> asymmetricCellPathComparator()
    {
        return asymmetricCellPathComparator;
    }

    public Comparator<? super Cell> cellComparator()
    {
        return cellComparator;
    }

    public boolean isComplex()
    {
        return cellPathComparator != null;
    }

    public boolean isSimple()
    {
        return !isComplex();
    }

    public CellPath.Serializer cellPathSerializer()
    {
        // Collections are our only complex so far, so keep it simple
        return CollectionType.cellPathSerializer;
    }

    public void validateCellValue(ByteBuffer value)
    {
        type.validateCellValue(value);
    }

    public void validateCellPath(CellPath path)
    {
        if (!isComplex())
            throw new MarshalException("Only complex cells should have a cell path");

        assert type.isMultiCell();
        if (type.isCollection())
            ((CollectionType)type).nameComparator().validate(path.get(0));
        else
            ((UserType)type).nameComparator().validate(path.get(0));
    }

    public static String toCQLString(Iterable<ColumnDefinition> defs)
    {
        return toCQLString(defs.iterator());
    }

    public static String toCQLString(Iterator<ColumnDefinition> defs)
    {
        if (!defs.hasNext())
            return "";

        StringBuilder sb = new StringBuilder();
        sb.append(defs.next().name);
        while (defs.hasNext())
            sb.append(", ").append(defs.next().name);
        return sb.toString();
    }

    /**
     * The type of the cell values for cell belonging to this column.
     *
     * This is the same than the column type, except for collections where it's the 'valueComparator'
     * of the collection.
     */
    public AbstractType<?> cellValueType()
    {
        return type instanceof CollectionType
             ? ((CollectionType)type).valueComparator()
             : type;
    }

    public Selector.Factory newSelectorFactory(CFMetaData cfm, AbstractType<?> expectedType, List<ColumnDefinition> defs, VariableSpecifications boundNames) throws InvalidRequestException
    {
        return SimpleSelector.newFactory(this, addAndGetIndex(this, defs));
    }

    public AbstractType<?> getExactTypeIfKnown(String keyspace)
    {
        return type;
    }

    /**
     * Because Thrift-created tables may have a non-text comparator, we cannot determine the proper 'key' until
     * we know the comparator. ColumnDefinition.Raw is a placeholder that can be converted to a real ColumnIdentifier
     * once the comparator is known with prepare(). This should only be used with identifiers that are actual
     * column names. See CASSANDRA-8178 for more background.
     */
    public static abstract class Raw extends Selectable.Raw
    {
        /**
         * Creates a {@code ColumnDefinition.Raw} from an unquoted identifier string.
         */
        public static Raw forUnquoted(String text)
        {
            return new Literal(text, false);
        }

        /**
         * Creates a {@code ColumnDefinition.Raw} from a quoted identifier string.
         */
        public static Raw forQuoted(String text)
        {
            return new Literal(text, true);
        }

        /**
         * Creates a {@code ColumnDefinition.Raw} from a pre-existing {@code ColumnDefinition}
         * (useful in the rare cases where we already have the column but need
         * a {@code ColumnDefinition.Raw} for typing purposes).
         */
        public static Raw forColumn(ColumnDefinition column)
        {
            return new ForColumn(column);
        }

        /**
         * Get the identifier corresponding to this raw column, without assuming this is an
         * existing column (unlike {@link #prepare}).
         */
        public abstract ColumnIdentifier getIdentifier(CFMetaData cfm);

        public abstract String rawText();

        @Override
        public abstract ColumnDefinition prepare(CFMetaData cfm);

        @Override
        public boolean processesSelection()
        {
            return false;
        }

        @Override
        public final int hashCode()
        {
            return toString().hashCode();
        }

        @Override
        public final boolean equals(Object o)
        {
            if(!(o instanceof Raw))
                return false;

            Raw that = (Raw)o;
            return this.toString().equals(that.toString());
        }

        private static class Literal extends Raw
        {
            private final String text;

            public Literal(String rawText, boolean keepCase)
            {
                this.text =  keepCase ? rawText : rawText.toLowerCase(Locale.US);
            }

            public ColumnIdentifier getIdentifier(CFMetaData cfm)
            {
                if (!cfm.isStaticCompactTable())
                    return ColumnIdentifier.getInterned(text, true);

                AbstractType<?> thriftColumnNameType = cfm.thriftColumnNameType();
                if (thriftColumnNameType instanceof UTF8Type)
                    return ColumnIdentifier.getInterned(text, true);

                // We have a Thrift-created table with a non-text comparator. Check if we have a match column, otherwise assume we should use
                // thriftColumnNameType
                ByteBuffer bufferName = ByteBufferUtil.bytes(text);
                for (ColumnDefinition def : cfm.allColumns())
                {
                    if (def.name.bytes.equals(bufferName))
                        return def.name;
                }
                return ColumnIdentifier.getInterned(thriftColumnNameType, thriftColumnNameType.fromString(text), text);
            }

            public ColumnDefinition prepare(CFMetaData cfm)
            {
                if (!cfm.isStaticCompactTable())
                    return find(cfm);

                AbstractType<?> thriftColumnNameType = cfm.thriftColumnNameType();
                if (thriftColumnNameType instanceof UTF8Type)
                    return find(cfm);

                // We have a Thrift-created table with a non-text comparator. Check if we have a match column, otherwise assume we should use
                // thriftColumnNameType
                ByteBuffer bufferName = ByteBufferUtil.bytes(text);
                for (ColumnDefinition def : cfm.allColumns())
                {
                    if (def.name.bytes.equals(bufferName))
                        return def;
                }
                return find(thriftColumnNameType.fromString(text), cfm);
            }

            private ColumnDefinition find(CFMetaData cfm)
            {
                return find(ByteBufferUtil.bytes(text), cfm);
            }

            private ColumnDefinition find(ByteBuffer id, CFMetaData cfm)
            {
                ColumnDefinition def = cfm.getColumnDefinition(id);
                if (def == null)
                    throw new InvalidRequestException(String.format("Undefined column name %s", toString()));
                return def;
            }

            public String rawText()
            {
                return text;
            }

            @Override
            public String toString()
            {
                return ColumnIdentifier.maybeQuote(text);
            }
        }

        // Use internally in the rare case where we need a ColumnDefinition.Raw for type-checking but
        // actually already have the column itself.
        private static class ForColumn extends Raw
        {
            private final ColumnDefinition column;

            private ForColumn(ColumnDefinition column)
            {
                this.column = column;
            }

            public ColumnIdentifier getIdentifier(CFMetaData cfm)
            {
                return column.name;
            }

            public ColumnDefinition prepare(CFMetaData cfm)
            {
                assert cfm.getColumnDefinition(column.name) != null; // Sanity check that we're not doing something crazy
                return column;
            }

            public String rawText()
            {
                return column.name.toString();
            }

            @Override
            public String toString()
            {
                return column.name.toCQLString();
            }
        }
    }

}


text:
import random
import networkx as nx
from graph_constr_group_testing.core import base_types

class TestGraphException(Exception):
    pass

def generate_dag(n):
    dag = nx.DiGraph()
    for i in range(n):
        for j in range(i):
            if bool(random.randint(0,1)):
                dag.add_edge(j, i)
    return dag

def reachableNodes(g, startNode):
    reachableNodesCount = 0
    for node in nx.dfs_preorder_nodes(g, startNode):
        reachableNodesCount += 1
    return reachableNodesCount

def get_start_stop_vertex(g):
    n = g.number_of_nodes()
    t = nx.topological_sort(g)
    potentialStart = t[0]
    potentialEnd = t[-1]
    reversedGraph = g.reverse(copy=True)

    if reachableNodes(g, potentialStart) == n and reachableNodes(reversedGraph, potentialEnd) == n:
        return potentialStart, potentialEnd
    else:
        raise TestGraphException()

def generate_connected_dag(n):
    g = generate_dag(n)
    while True:
        try:
            start, stop = get_start_stop_vertex(g)
            break
        except TestGraphException:
            g = generate_dag(n)

    return base_types.ProblemGraph(g, start, stop)

def faulty_nodes(problemGraph, d):
    normalNodes = [node for node in problemGraph.graph.nodes_iter() if not node in [problemGraph.source, problemGraph.sink]]
    return set(random.sample(normalNodes, d))

def generate_random_problem_description(n, d):
    """
    :param n: number of internal nodes (not counting start and sink node)
    :param d: number of faulty nodes (it will be some subset of size d of internal nodes)
    """
    #first generate random dag
    problemGraph = generate_connected_dag(n + 2)
    f_nodes = faulty_nodes(problemGraph, d)
    return base_types.GCGTProblem(all_nodes=problemGraph.graph.nodes(), problem_graph=problemGraph, faulty_set=f_nodes, description=None)


text:
var speakerNames = [
    "
Welcome
",
    "
Daniel Llugany | Domestic Data Streamers
New Data Languages 😍",
    "
Gene Kogan
Machine Learning for Artists",
    "
Break
13:00 - 14:00",
    "
Santi Vilanova | Playmodes
Immersive Experiences",
    "
Mario Klingemann
Artificial Intelligence",
    "
Panel Discussion
Vera-Maria Glahn, Mario Klingemann, Santi Vilanova & Mlady Pes",
    "
Break
16:50 - 17:30",
    "
Mária Júdová
Dance Tech",
    "
Vera-Maria Glahn | FIELD
Generative Audio-visual Experiences",
    "
\

Thank you
\

\

Barbora Janáková - PR, marketing, production assistance, girl for everything and mental support
\

Nina Adamcová - artworks coordination, production assistance
\

Štefánia Lovasová - Instagram and poster guru
\

Dominik Hlinka - technical support
\

Michal Čudrnák - general support and helpfulness
\

Matúš Solčány - bringing logic and scissors
\

Michal Chrastina - strong hands and mind
\

Anna Hunčíková - welcome team
\

Dominika Dubačová - welcome team and driving
\

Miri - documentation
\

Lukrécia Tilandyová - tastiness
\

Mad Drop - energy
\

Róbert Bonko - sound
\

Braňo Valter - sound and picture
\

Ján Adášek - atmosphere
\

Matej Fandl & Lubica Drangová - mental support and general helpfulness
\

Zuzana Beniacová & Jana Binder - going one step further than neccessary
\

\

\

\
        \
        \
        \

",
];
var speakerIndex = 0;
var speakerText;
var showCursor = true;
var colorCombinations;

var mic;

function setup() {
    createCanvas(windowWidth, windowHeight);
    background(0);
    frameRate(30);
    smooth();
    noFill();

    var teal = color('#0096AC');
    var pink = color('#FBD2CE');
    var purple = color('#796CAF');
    var green = color('#9CFCCF');

    var colors = [teal, pink, purple, green];
    colorCombinations = combine(colors);

    splineSettings1 = {
        nPoints: 8,
        origin: {
            x: 0.6 * width,
            y: 0.4 * height
        },
        radius: 300,
        distortFactor: 150,
        colors: [teal, pink],
        interpolationSteps: 4,
        movement: {
            moveFactor: 0.5,    // 0 == no positional animation
            noiseFactor: 0,     // 0 == no noise
            easeFactor: 0.05,   // 1 == no easing
            tightnessFactor: 0  // 0 == no tightness animation
        }
    }
    splineLoop1 = new SplineLoop(splineSettings1);
    splineLoop1.draw();

    // setMouseMoveListener(document);

    var cursorIntervalID = window.setInterval(setRandomCursorPos, 5000);

    speakerText = addText(speakerNames[0]);

    // Create an Audio input
    mic = new p5.AudioIn();
    // start the Audio Input.
    // By default, it does not .connect() (to the computer speakers)
    mic.start();
}

function setRandomCursorPos() {
    var randX = getRandomInt(0, width);
    var randY = getRandomInt(0, height);
    splineLoop1.setCursor({x: randX, y: randY});
}

/*
 * set mousemove listener, extending obj with boolean attr obj.hasMouseMoved
 */
function setMouseMoveListener(obj) {
    obj.addEventListener('mousemove', function onFirstMouseMove() {
        obj.hasMouseMoved = true;
        if (typeof mouseTimeout !== 'undefined') {
            clearTimeout(mouseTimeout);
        }
        var mouseTimeout = setTimeout(function () {
            obj.hasMouseMoved = false;
        }, 5000);
    }, false);
}

function combine(colors) {
    var combinations = []
    for (var i = colors.length - 1; i >= 0; i--) {
        for (var j = colors.length - 1; j >= 0; j--) {
            if (colors[i] !== colors[j]) {
                combinations.push([colors[i], colors[j]])
            }
        }
    }
    return combinations
}

function includes(array, item) {
    return array.indexOf(item) > -1
}

function setSpeakerText(index) {
    speakerIndex = index;
    console.log('setSpeakerText: ' + index);
    speakerText.elt.innerHTML = speakerNames[index];
}

function keyPressed() {
    // console.log(key)
    // console.log(keyCode)
    if (parseInt(key) > 0 && parseInt(key) <= speakerNames.length) {
        setSpeakerText(parseInt(key)-1);
        // set random spline colour combi
        var randomColorCombi = colorCombinations[getRandomInt(0, colorCombinations.length)];
        splineLoop1.setColors(randomColorCombi[0], randomColorCombi[1]);
        // set random spline shape
        splineLoop1.generateSplines();
    } else if (key === "C") {
        toggleCursor();
    } else if (key === "F") {
        toggleFullScreen();
    } else if (keyCode === LEFT_ARROW) {
        // set previous speaker
        if (speakerIndex > 0) {
            setSpeakerText(speakerIndex-1);
            // set random spline colour combi
            var randomColorCombi = colorCombinations[getRandomInt(0, colorCombinations.length)];
            splineLoop1.setColors(randomColorCombi[0], randomColorCombi[1]);
            // set random spline shape
            splineLoop1.generateSplines();
        }
    } else if (keyCode === RIGHT_ARROW) {
        // set next speaker
        if (speakerIndex < speakerNames.length - 1) {
            setSpeakerText(speakerIndex + 1);
            // set random spline colour combi
            var randomColorCombi = colorCombinations[getRandomInt(0, colorCombinations.length)];
            splineLoop1.setColors(randomColorCombi[0], randomColorCombi[1]);
            // set random spline shape
            splineLoop1.generateSplines();
        }
    }
    // uncomment to prevent any default behavior
    // return false;
}

function addText(string) {
    myText = createDiv(string);
    myText.class("text");
    return myText;
}

function mousePressed() {
}

function toggleFullScreen() {
    var fs = fullscreen();
    fullscreen(!fs);
}

function toggleCursor() {
    if (showCursor) {
        noCursor();
    } else {
        cursor(ARROW);
    }
    showCursor = !showCursor;
}

function draw() {
    background(0);
    splineLoop1.update();
    splineLoop1.draw();

    // splineLoop1.setCursor({x: mouseX, y: mouseY});

    // Get the overall volume (between 0 and 1.0)
    var vol = mic.getLevel();
    splineLoop1.setVertexFactor(1+vol);
}

function windowResized() {
    resizeCanvas(windowWidth, windowHeight);
}

function getRandomInt(min, max) {
  min = Math.ceil(min);
  max = Math.floor(max);
  return Math.floor(Math.random() * (max - min)) + min;
}


text:
#pragma once

#include <geneial/namespaces.h>
#include <geneial/core/population/builder/MultiValueBuilderSettings.h>

geneial_private_namespace(geneial)
{
geneial_private_namespace(population)
{
geneial_private_namespace(chromosome)
{

geneial_export_namespace
{

template<typename VALUE_TYPE, typename FITNESS_TYPE>
class ContinousMultiValueBuilderSettings: public MultiValueBuilderSettings<VALUE_TYPE, FITNESS_TYPE>
{
private:

    bool _hasStart; //Do we have a starting point?

    VALUE_TYPE _start; //the starting point from which to start the chromosome array

    VALUE_TYPE _eps; //eps delta deriation between values in the array

public:

    const static bool DEFAULT_HAS_START = false;
    const static bool DEFAULT_START = 0;
    const static bool DEFAULT_EPS = 1;

    ContinousMultiValueBuilderSettings(const typename FitnessEvaluator<FITNESS_TYPE>::ptr fitnessEvaluator,
                                       const unsigned int num = MultiValueBuilderSettings<VALUE_TYPE, FITNESS_TYPE>::DEFAULT_NUM,
                                       const VALUE_TYPE random_max = MultiValueBuilderSettings<VALUE_TYPE, FITNESS_TYPE>::DEFAULT_RANDOM_MAX,
                                       const  VALUE_TYPE random_min = MultiValueBuilderSettings<VALUE_TYPE, FITNESS_TYPE>::DEFAULT_RANDOM_MIN,
                                       const bool hasStart = DEFAULT_HAS_START,
                                       const VALUE_TYPE start = DEFAULT_START,
                                       const VALUE_TYPE eps = DEFAULT_EPS) :
            MultiValueBuilderSettings<VALUE_TYPE, FITNESS_TYPE>(fitnessEvaluator, num, random_max, random_min),
            _hasStart(hasStart),
            _start(start), //Start point for generating ContinousChromomsomes
            _eps(eps) //Eps derivation from previous point per step
    {
    }

    virtual ~ContinousMultiValueBuilderSettings()
    {
    }

    VALUE_TYPE getEps() const
    {
        return _eps;
    }

    void setEps(VALUE_TYPE eps)
    {
        _eps = eps;
    }

    void setHasStart(bool hasStart)
    {
        _hasStart = hasStart;
    }

    VALUE_TYPE hasStart() const
    {
        return _hasStart;
    }

    VALUE_TYPE getStartValue() const
    {
        return _start;
    }

    void setStartValue(VALUE_TYPE start)
    {
        _start = start;
    }
};

} /* geneial_export_namespace */
} /* private namespace chromosome */
} /* private namespace population */
} /* private namespace geneial */


text:
package org.apache.ambari.funtest.server.utils;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.inject.Inject;
import com.google.inject.Injector;
import org.apache.ambari.funtest.server.AmbariUserRole;
import org.apache.ambari.funtest.server.ClusterConfigParams;
import org.apache.ambari.funtest.server.ConnectionParams;
import org.apache.ambari.funtest.server.WebRequest;
import org.apache.ambari.funtest.server.WebResponse;
import org.apache.ambari.funtest.server.api.cluster.AddDesiredConfigurationWebRequest;
import org.apache.ambari.funtest.server.api.cluster.CreateClusterWebRequest;
import org.apache.ambari.funtest.server.api.cluster.CreateConfigurationWebRequest;
import org.apache.ambari.funtest.server.api.cluster.GetRequestStatusWebRequest;
import org.apache.ambari.funtest.server.api.cluster.SetUserPrivilegeWebRequest;
import org.apache.ambari.funtest.server.api.host.AddHostWebRequest;
import org.apache.ambari.funtest.server.api.host.RegisterHostWebRequest;
import org.apache.ambari.funtest.server.api.service.AddServiceWebRequest;
import org.apache.ambari.funtest.server.api.service.InstallServiceWebRequest;
import org.apache.ambari.funtest.server.api.servicecomponent.AddServiceComponentWebRequest;
import org.apache.ambari.funtest.server.api.servicecomponenthost.BulkAddServiceComponentHostsWebRequest;
import org.apache.ambari.funtest.server.api.servicecomponenthost.BulkSetServiceComponentHostStateWebRequest;
import org.apache.ambari.funtest.server.api.user.CreateUserWebRequest;
import org.apache.ambari.server.actionmanager.HostRoleStatus;
import org.apache.ambari.server.controller.AmbariServer;
import org.apache.ambari.server.orm.entities.PrincipalTypeEntity;
import org.apache.ambari.server.state.Clusters;
import org.apache.ambari.server.state.Host;
import org.apache.ambari.server.state.State;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class ClusterUtils {

    private static Log LOG = LogFactory.getLog(ClusterUtils.class);

    @Inject
    private Injector injector;

    public void createSampleCluster(ConnectionParams serverParams) throws Exception {
        WebResponse response = null;
        JsonElement jsonResponse;
        String clusterName = "c1";
        String hostName = "host1";
        String clusterVersion = "HDP-2.2.0";

        /**
         * Create a cluster
         */
        jsonResponse = RestApiUtils.executeRequest(new CreateClusterWebRequest(serverParams, clusterName, clusterVersion));

        /**
         * Register a host
         */
        if (injector == null) {
            jsonResponse =  RestApiUtils.executeRequest(new RegisterHostWebRequest(serverParams, hostName));
        }
        else {
            /**
             * Hack: Until we figure out how to get the agent servlet going,
             * register a host directly using the Clusters class.
             */
            Clusters clusters = injector.getInstance(Clusters.class);
            clusters.addHost(hostName);
            Host host1 = clusters.getHost(hostName);
            Map<String, String> hostAttributes = new HashMap<String, String>();
            hostAttributes.put("os_family", "redhat");
            hostAttributes.put("os_release_version", "6.3");
            host1.setHostAttributes(hostAttributes);
        }

        /**
         * Add the registered host to the new cluster
         */
        jsonResponse =  RestApiUtils.executeRequest(new AddHostWebRequest(serverParams, clusterName, hostName));

        /**
         * Create and add a configuration to our cluster
         */

        String configType = "test-hadoop-env";
        String configTag = "version1";
        ClusterConfigParams configParams = new ClusterConfigParams();
        configParams.setClusterName(clusterName);
        configParams.setConfigType(configType);
        configParams.setConfigTag(configTag);
        configParams.setProperties(new HashMap<String, String>() {{
            put("fs.default.name", "localhost:9995");
        }});

        jsonResponse = RestApiUtils.executeRequest(new CreateConfigurationWebRequest(serverParams, configParams));

        /**
         * Apply the desired configuration to our cluster
         */
        jsonResponse = RestApiUtils.executeRequest(new AddDesiredConfigurationWebRequest(serverParams, configParams));

        /**
         * Add a service to the cluster
         */

        String serviceName = "HDFS";
        jsonResponse = RestApiUtils.executeRequest(new AddServiceWebRequest(serverParams, clusterName, serviceName));

        String [] componentNames = new String [] {"NAMENODE", "DATANODE", "SECONDARY_NAMENODE"};

        /**
         * Add components to the service
         */
        for (String componentName : componentNames) {
            jsonResponse = RestApiUtils.executeRequest(new AddServiceComponentWebRequest(serverParams, clusterName,
                    serviceName, componentName));
        }

        /**
         * Install the service
         */
        jsonResponse = RestApiUtils.executeRequest(new InstallServiceWebRequest(serverParams, clusterName, serviceName));

        /**
         * Add components to the hostß
         */

        jsonResponse = RestApiUtils.executeRequest(new BulkAddServiceComponentHostsWebRequest(serverParams, clusterName,
                Arrays.asList(hostName), Arrays.asList(componentNames)));

        /**
         * Install the service component hosts
         */
        jsonResponse = RestApiUtils.executeRequest(new BulkSetServiceComponentHostStateWebRequest(serverParams,
                    clusterName, State.INIT, State.INSTALLED));
        if (!jsonResponse.isJsonNull()) {
            int requestId = parseRequestId(jsonResponse);
            RequestStatusPoller.poll(serverParams, clusterName, requestId);
        }

        /**
         * Start the service component hosts
         */

        jsonResponse = RestApiUtils.executeRequest(new BulkSetServiceComponentHostStateWebRequest(serverParams,
                clusterName, State.INSTALLED, State.STARTED));
        if (!jsonResponse.isJsonNull()) {
            int requestId = parseRequestId(jsonResponse);
            RequestStatusPoller.poll(serverParams, clusterName, requestId);
        }

        /**
         * Start the service
         */
        //jsonResponse = RestApiUtils.executeRequest(new StartServiceWebRequest(serverParams, clusterName, serviceName));
    }

    /**
     * Creates a user with the specified role.
     *
     * @param connectionParams
     * @param clusterName
     * @param userName
     * @param password
     * @param userRole
     * @throws Exception
     */
    public static void createUser(ConnectionParams connectionParams, String clusterName,String userName,
                                 String password, AmbariUserRole userRole ) throws Exception {
        JsonElement jsonResponse;

        jsonResponse = RestApiUtils.executeRequest(new CreateUserWebRequest(connectionParams, userName, password,
                CreateUserWebRequest.ActiveUser.TRUE, CreateUserWebRequest.AdminUser.FALSE));

        LOG.info(jsonResponse);

        if (userRole != AmbariUserRole.NONE) {
            jsonResponse = RestApiUtils.executeRequest(new SetUserPrivilegeWebRequest(connectionParams,
                    clusterName, userName, userRole, PrincipalTypeEntity.USER_PRINCIPAL_TYPE_NAME));

            LOG.info(jsonResponse);
        }
    }

    /**
     * Creates a user with CLUSTER.USER privilege.
     *
     * @param connectionParams
     * @param clusterName
     * @param userName
     * @param password
     * @throws Exception
     */
    public static void createUserClusterUser(ConnectionParams connectionParams, String clusterName,
                                              String userName, String password) throws Exception {
        createUser(connectionParams, clusterName, userName, password, AmbariUserRole.CLUSTER_USER);
    }

    /**
     * Creates a user with SERVICE.OPERATOR privilege
     *
     * @param connectionParams
     * @param clusterName
     * @param userName
     * @param password
     * @throws Exception
     */
    public static void createUserServiceOperator(ConnectionParams connectionParams, String clusterName,
                                              String userName, String password) throws Exception {
        createUser(connectionParams, clusterName, userName, password, AmbariUserRole.SERVICE_OPERATOR);
    }

    /**
     * Creates a user with SERVICE.ADMINISTRATOR privilege
     *
     * @param connectionParams
     * @param clusterName
     * @param userName
     * @param password
     * @throws Exception
     */
    public static void createUserServiceAdministrator(ConnectionParams connectionParams, String clusterName,
                                              String userName, String password) throws Exception {
        createUser(connectionParams, clusterName, userName, password, AmbariUserRole.SERVICE_ADMINISTRATOR);
    }

    /**
     * Creates a user with CLUSTER.OPERATOR privilege
     *
     * @param connectionParams
     * @param clusterName
     * @param userName
     * @param password
     * @throws Exception
     */
    public static void createUserClusterOperator(ConnectionParams connectionParams, String clusterName,
                                              String userName, String password) throws Exception {
        createUser(connectionParams, clusterName, userName, password, AmbariUserRole.CLUSTER_OPERATOR);
    }

    /**
     * Creates a user with CLUSTER.ADMINISTRATOR privilege.
     *
     * @param connectionParams
     * @param clusterName
     * @param userName
     * @param password
     * @throws Exception
     */
    public static void createUserClusterAdministrator(ConnectionParams connectionParams, String clusterName,
                                              String userName, String password) throws Exception {
        createUser(connectionParams, clusterName, userName, password, AmbariUserRole.CLUSTER_ADMINISTRATOR);
    }

    /**
     * Parses a JSON response string for  { "Requests" : { "id" : "2" } }
     *
     * @param jsonResponse
     * @return - request id
     * @throws IllegalArgumentException
     */
    private static int parseRequestId(JsonElement jsonResponse) throws IllegalArgumentException {
        if (jsonResponse.isJsonNull()) {
            throw new IllegalArgumentException("jsonResponse with request id expected.");
        }

        JsonObject jsonObject = jsonResponse.getAsJsonObject();
        int requestId = jsonObject.get("Requests").getAsJsonObject().get("id").getAsInt();
        return requestId;
    }
}


text:
'use strict';

// MODULES //

var matrix = require( 'dstructs-matrix' ),
	partial = require( './partial.js' );

// RANDOM //

/**
* FUNCTION: random( dims, dt, x0, gamma[, rand] )
*	Creates a matrix of Cauchy distributed random numbers.
*
* @param {Number[]} dims - dimensions
* @param {String} dt - data type
* @param {Number} x0 - location parameter
* @param {Number} gamma - scale parameter
* @param {Function} [rand=Math.random] - random number generator
* @returns {Matrix} matrix filled with Cauchy random numbers
*/
function random( dims, dt, x0, gamma, rand ) {
	var out,
		draw,
		i;

	draw = partial( x0, gamma, rand );
	out = matrix( dims, dt );
	for ( i = 0; i < out.length; i++ ) {
		out.data[ i ] = draw();
	}
	return out;
} // end FUNCTION random()

// EXPORTS //

module.exports = random;


text:
require 'byebug' if ENV['DEBUG']
require 'minitest/autorun'
require_relative '../lib/output_builder'

# Only a simple test of the output builder class
class TestOutputBuilder < Minitest::Test
  def test_simple
    output = Thoom::SimpleOutputBuilder.new
    assert_equal :default, output.colors[:title_color]
  end

  def test_default
    output = Thoom::DefaultOutputBuilder.new
    assert_equal 16, output.colors.length
  end
end


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
  Copyright 2016 Goldman Sachs.
  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.
  -->

<!--
*
*
*
*
-->

<MithraObject
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="../mithraobject.xsd"
        objectType="transactional">
    <PackageName>com.gs.fw.common.mithra.test.domain.nvmdev</PackageName>
    <ClassName>NvmDevVirtualLan</ClassName>
    <DefaultTable>nvm_discovery_virtual_lan</DefaultTable>

    <Attribute name="virtualLanId" javaType="long" columnName="virtual_lan_id" primaryKey="true"/>
    <Attribute name="networkDeviceId" javaType="long" columnName="network_device_id"/>
    <Attribute name="number" javaType="int" columnName="number"/>
    <Attribute name="description" javaType="String" columnName="description" maxLength="255"/>
</MithraObject>


text:
namespace arangodb {
namespace basics {

typedef ReadWriteLockCPP11 ReadWriteLock;
#else
namespace arangodb {
namespace basics {

/// @brief read-write lock
class ReadWriteLock {
  ReadWriteLock(ReadWriteLock const&) = delete;
  ReadWriteLock& operator=(ReadWriteLock const&) = delete;

 public:
  /// @brief constructs a read-write lock
  ReadWriteLock();

  /// @brief deletes read-write lock
  ~ReadWriteLock();

 public:
  /// @brief locks for reading
  void readLock();

  /// @brief tries to lock for reading
  bool tryReadLock();

  /// @brief tries to lock for reading, sleeping if the lock cannot be
  /// acquired instantly, sleepTime is in microseconds
  bool tryReadLock(uint64_t sleepTime);

  /// @brief locks for writing
  void writeLock();

  /// @brief tries to lock for writing
  bool tryWriteLock();

  /// @brief tries to lock for writing, sleeping if the lock cannot be
  /// acquired instantly, sleepTime is in microseconds
  bool tryWriteLock(uint64_t sleepTime);

  /// @brief releases the read-lock or write-lock
  void unlock();

  /// @brief releases the read-lock
  void unlockRead();

  /// @brief releases the write-lock
  void unlockWrite();

 private:
  /// @brief read-write lock variable
  TRI_read_write_lock_t _rwlock;

  /// @brief write lock marker
  bool _writeLocked;
};

#endif

}
}

#endif


text:
from manila.api import common
from manila.common import constants

class ViewBuilder(common.ViewBuilder):
    """Model a server API response as a python dictionary."""

    _collection_name = 'security_services'
    _detail_version_modifiers = [
        'add_ou_to_security_service',
    ]

    def summary_list(self, request, security_services):
        """Show a list of security services without many details."""
        return self._list_view(self.summary, request, security_services)

    def detail_list(self, request, security_services):
        """Detailed view of a list of security services."""
        return self._list_view(self.detail, request, security_services)

    def summary(self, request, security_service):
        """Generic, non-detailed view of a security service."""
        return {
            'security_service': {
                'id': security_service.get('id'),
                'name': security_service.get('name'),
                'type': security_service.get('type'),
                # NOTE(vponomaryov): attr "status" was removed from model and
                # is left in view for compatibility purposes since it affects
                # user-facing API. This should be removed right after no one
                # uses it anymore.
                'status': constants.STATUS_NEW,
            }
        }

    def detail(self, request, security_service):
        """Detailed view of a single security service."""
        view = self.summary(request, security_service)
        keys = (
            'created_at', 'updated_at', 'description', 'dns_ip', 'server',
            'domain', 'user', 'password', 'project_id')
        for key in keys:
            view['security_service'][key] = security_service.get(key)
        self.update_versioned_resource_dict(
            request, view['security_service'], security_service)
        return view

    @common.ViewBuilder.versioned_method("2.44")
    def add_ou_to_security_service(self, context, ss_dict, ss):
        ss_dict['ou'] = ss.get('ou')

    def _list_view(self, func, request, security_services):
        """Provide a view for a list of security services."""
        security_services_list = [func(request, service)['security_service']
                                  for service in security_services]
        security_services_dict = dict(security_services=security_services_list)
        return security_services_dict


text:
package com.renren.mobile.chat.ui.chatsession;

import android.content.ContentValues;
import android.text.TextUtils;

import com.common.network.DomainUrl;
import com.renren.mobile.chat.base.model.ChatBaseItem;
import com.renren.mobile.chat.common.TextualUtil;
import com.renren.mobile.chat.dao.ChatSessionDAO;
import com.renren.mobile.chat.dao.DAOFactoryImpl;
import com.renren.mobile.chat.database.ChatSession_Column;
import com.renren.mobile.chat.model.warpper.ChatMessageWarpper;

/**
 * @author rubin.dong@renren-inc.com
 * @data 对话列表数据控制
 * */

public class ChatSessionHelper {

	private static ChatSessionHelper sInstance = new ChatSessionHelper();
	ChatSessionDAO mSessionDAO = null;

	private ChatSessionHelper(){
		mSessionDAO = DAOFactoryImpl.getInstance().buildDAO(ChatSessionDAO.class);
	}

	public static ChatSessionHelper getInstance(){
		return sInstance;
	}

	/*插入一条数据*/
	public void insertToTheDatabase(ChatMessageWarpper message){
		mSessionDAO.insertChatSession(message);
	}

	/*删除一条数据*/
	public void deleteChatSessionByGroupId(long groupId){
		mSessionDAO.deleteChatSessionByGroupId(groupId);
	}

	/*变更数据库*/
	public int updateMessage(ChatMessageWarpper messageWarpper,String messageContent){
		ContentValues value = new ContentValues(7);
		value.put(ChatSession_Column.MESSAGE, messageContent);
		value.put(ChatSession_Column.MESSAGE_ID, messageWarpper.mMessageId);
		value.put(ChatSession_Column.MESSAGE_STATE, messageWarpper.mMessageState);
		value.put(ChatSession_Column.CHAT_TIME, messageWarpper.mMessageReceiveTime);
		value.put(ChatSession_Column.COME_FROM, messageWarpper.mComefrom);
		value.put(ChatSession_Column.MESSAGE_TYPE, messageWarpper.mMessageType);
		value.put(ChatSession_Column.TO_CHAT_NAME, messageWarpper.mUserName);
		if(!TextUtils.isEmpty(messageWarpper.mDomain)){
			value.put(ChatSession_Column.DOMAIN, messageWarpper.mDomain);
		}else{
			value.put(ChatSession_Column.DOMAIN, DomainUrl.SIXIN_DOMAIN);
		}
		int row = mSessionDAO.updateByGroupId(messageWarpper.mGroupId, value);
		return row;
	}

	/*变更数据库*/
	public void updateMessageContent(int messageId, String messageContent, long groupId){
		ContentValues value = new ContentValues(2);
		value.put(ChatSession_Column.MESSAGE, messageContent);
		value.put(ChatSession_Column.MESSAGE_ID, messageId);
		mSessionDAO.updateByGroupId(groupId, value);
	}

	public void updateMessageTime(long groupId, int messageId, long time){
		ContentValues value = new ContentValues(2);
		value.put(ChatSession_Column.MESSAGE_ID, messageId);
		value.put(ChatSession_Column.CHAT_TIME, time);
		mSessionDAO.updateByGroupId(groupId, value);
	}

	/*更新消息发送状态*/
	public void updateMessageState(long messageId, ContentValues values){
		mSessionDAO.updateByMessageId(messageId, values);
	}

	/*查询单人聊天的总数*/
	public int querySinglePersonHistory(){
		return this.mSessionDAO.queryCountSinglePerson();
	}

	/*从数据库中删除所有人的聊天记录*/
	public void deleteAll(){
		mSessionDAO.deleteAll();
	}

}


text:
<?hh // strict

namespace CKWalsh\HackWS\Client;
use \Exception;

class WSClientException extends Exception {}


text:
import { createContext } from 'react'
import noop from 'lodash/noop'

export interface DialogContextProps {
  /**
   * Indicates currently animating when true
   */
  busy?: boolean
  closeModal: () => void
  /**
   * Used to connect the DialogHeader's title to the Dialog's `aria-labelledby`
   * @private
   */
  id: string
}

const dialogContext: DialogContextProps = {
  closeModal: () => noop,
  id: '',
}

export const DialogContext = createContext(dialogContext)


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebMedi.Client
{
    public partial class PanelLeftModules : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}


text:
package org.apache.kafka.streams.integration;

import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.integration.utils.EmbeddedKafkaCluster;
import org.apache.kafka.streams.integration.utils.IntegrationTestUtils;
import org.apache.kafka.streams.tests.SmokeTestClient;
import org.apache.kafka.streams.tests.SmokeTestDriver;
import org.apache.kafka.test.IntegrationTest;
import org.junit.Assert;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import java.time.Duration;
import java.util.ArrayList;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

import static org.apache.kafka.streams.tests.SmokeTestDriver.generate;
import static org.apache.kafka.streams.tests.SmokeTestDriver.verify;

@Category(IntegrationTest.class)
public class SmokeTestDriverIntegrationTest {
    @ClassRule
    public static final EmbeddedKafkaCluster CLUSTER = new EmbeddedKafkaCluster(3);

    private static class Driver extends Thread {
        private String bootstrapServers;
        private int numKeys;
        private int maxRecordsPerKey;
        private Exception exception = null;
        private SmokeTestDriver.VerificationResult result;

        private Driver(final String bootstrapServers, final int numKeys, final int maxRecordsPerKey) {
            this.bootstrapServers = bootstrapServers;
            this.numKeys = numKeys;
            this.maxRecordsPerKey = maxRecordsPerKey;
        }

        @Override
        public void run() {
            try {
                final Map<String, Set<Integer>> allData =
                    generate(bootstrapServers, numKeys, maxRecordsPerKey, Duration.ofSeconds(20));
                result = verify(bootstrapServers, allData, maxRecordsPerKey);

            } catch (final Exception ex) {
                this.exception = ex;
            }
        }

        public Exception exception() {
            return exception;
        }

        SmokeTestDriver.VerificationResult result() {
            return result;
        }

    }

    @Test
    public void shouldWorkWithRebalance() throws InterruptedException {
        int numClientsCreated = 0;
        final ArrayList<SmokeTestClient> clients = new ArrayList<>();

        IntegrationTestUtils.cleanStateBeforeTest(CLUSTER, SmokeTestDriver.topics());

        final String bootstrapServers = CLUSTER.bootstrapServers();
        final Driver driver = new Driver(bootstrapServers, 10, 1000);
        driver.start();
        System.out.println("started driver");

        final Properties props = new Properties();
        props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);

        // cycle out Streams instances as long as the test is running.
        while (driver.isAlive()) {
            // take a nap
            Thread.sleep(1000);

            // add a new client
            final SmokeTestClient smokeTestClient = new SmokeTestClient("streams-" + numClientsCreated++);
            clients.add(smokeTestClient);
            smokeTestClient.start(props);

            while (!clients.get(clients.size() - 1).started()) {
                Thread.sleep(100);
            }

            // let the oldest client die of "natural causes"
            if (clients.size() >= 3) {
                final SmokeTestClient client = clients.remove(0);

                client.closeAsync();
                while (!client.closed()) {
                    Thread.sleep(100);
                }
            }
        }

        try {
            // wait for verification to finish
            driver.join();
        } finally {
            // whether or not the assertions failed, tell all the streams instances to stop
            for (final SmokeTestClient client : clients) {
                client.closeAsync();
            }

            // then, wait for them to stop
            for (final SmokeTestClient client : clients) {
                while (!client.closed()) {
                    Thread.sleep(100);
                }
            }
        }

        // check to make sure that it actually succeeded
        if (driver.exception() != null) {
            driver.exception().printStackTrace();
            throw new AssertionError(driver.exception());
        }
        Assert.assertTrue(driver.result().result(), driver.result().passed());
    }

}