text:
package co.je.conductor;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import io.dropwizard.Application;
import io.dropwizard.java8.Java8Bundle;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;

import java.util.EnumSet;

import javax.servlet.DispatcherType;
import javax.servlet.FilterRegistration.Dynamic;

import org.eclipse.jetty.servlets.CrossOriginFilter;

import co.je.conductor.api.resources.JobRequestResource;
import co.je.conductor.domain.business.JobBusiness;
import co.je.conductor.infrastructure.config.ConductorConfig;
import co.je.conductor.persistence.daos.JobRequestDAO;
import co.je.conductor.persistence.daos.JobResultDAO;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.mongodb.DB;
import com.mongodb.MongoClient;

public class Conductor extends Application<ConductorConfig> {

    @Override
    public void initialize(Bootstrap<ConductorConfig> bootstrap) {

        bootstrap.addBundle(new Java8Bundle());
    }

    private void addCORSSupport(Environment environment) {

        Dynamic filter = environment.servlets().addFilter("CORS", CrossOriginFilter.class);
        filter.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
        filter.setInitParameter(CrossOriginFilter.ALLOWED_METHODS_PARAM, "GET,PUT,POST,DELETE,OPTIONS,PATCH");
        filter.setInitParameter(CrossOriginFilter.ALLOWED_ORIGINS_PARAM, "*");
        filter.setInitParameter(CrossOriginFilter.ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, "*");
        filter.setInitParameter("allowedHeaders", "Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin");
        filter.setInitParameter("allowCredentials", "true");
    }

    public static ObjectMapper configureJackson(ObjectMapper objectMapper) {

        objectMapper.registerModule(new JodaModule());
        objectMapper.setDateFormat(new ISO8601DateFormat());
        objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
        objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
        objectMapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true);
        objectMapper.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true);
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

        return objectMapper;
    }

    private JobRequestResource getJobRequestResource(DB mongoDB, ObjectMapper objectMapper) {

        JobRequestDAO jobRequestDAO = new JobRequestDAO(objectMapper);
        JobResultDAO jobResultDAO = new JobResultDAO(objectMapper);
        JobBusiness jobBusiness = new JobBusiness(mongoDB, jobRequestDAO, jobResultDAO);

        return new JobRequestResource(jobBusiness);
    }

    @Override
    public void run(ConductorConfig conductorConfig, Environment environment) throws Exception {

        // add CORS support
        addCORSSupport(environment);
        ObjectMapper objectMapper = environment.getObjectMapper();
        configureJackson(objectMapper);

        // MongoDB
        MongoClient mongoClient = new MongoClient();
        DB mongoDB = mongoClient.getDB(conductorConfig.getMongoDBConfig().getDbName());

        JobRequestResource jobRequestResource = getJobRequestResource(mongoDB, objectMapper);
        environment.jersey().register(jobRequestResource);
    }

    public static void main(String[] args) {

        try {
            Conductor conductor = new Conductor();
            conductor.run(args);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


text:
package org.drools.core.factmodel.traits;

import org.drools.core.util.CodedHierarchy;

import java.util.BitSet;

public interface TypeLattice<T> extends CodedHierarchy<T> {

    BitSet getTopCode();

    void setTopCode( BitSet code );

    BitSet getBottomCode();

    void setBottomCode( BitSet code );
}

redpajama_set_name: RedPajamaGithub


text:
System.register('myBundle', [], function (exports, module) {
	'use strict';
	return {
		execute: function () {

			var bar = 1;

			exports('default', bar);

		}
	};
});


text:
package org.apache.flink.table.catalog;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.table.catalog.exceptions.CatalogException;
import org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistException;
import org.apache.flink.table.catalog.exceptions.DatabaseNotEmptyException;
import org.apache.flink.table.catalog.exceptions.DatabaseNotExistException;
import org.apache.flink.table.catalog.exceptions.FunctionAlreadyExistException;
import org.apache.flink.table.catalog.exceptions.FunctionNotExistException;
import org.apache.flink.table.catalog.exceptions.PartitionAlreadyExistsException;
import org.apache.flink.table.catalog.exceptions.PartitionNotExistException;
import org.apache.flink.table.catalog.exceptions.PartitionSpecInvalidException;
import org.apache.flink.table.catalog.exceptions.TableAlreadyExistException;
import org.apache.flink.table.catalog.exceptions.TableNotExistException;
import org.apache.flink.table.catalog.exceptions.TableNotPartitionedException;
import org.apache.flink.table.catalog.exceptions.TablePartitionedException;
import org.apache.flink.table.catalog.stats.CatalogColumnStatistics;
import org.apache.flink.table.catalog.stats.CatalogTableStatistics;
import org.apache.flink.table.expressions.Expression;
import org.apache.flink.table.factories.DynamicTableFactory;
import org.apache.flink.table.factories.Factory;
import org.apache.flink.table.factories.FunctionDefinitionFactory;
import org.apache.flink.table.factories.TableFactory;

import java.util.List;
import java.util.Optional;

/**
 * This interface is responsible for reading and writing metadata such as database/table/views/UDFs
 * from a registered catalog. It connects a registered catalog and Flink's Table API. This interface
 * only processes permanent metadata objects. In order to process temporary objects, a catalog can
 * also implement the {@link TemporaryOperationListener} interface.
 */
@PublicEvolving
public interface Catalog {

    /**
     * Returns a factory for creating instances from catalog objects.
     *
     *
This method enables bypassing the discovery process. Implementers can directly pass
     * internal catalog-specific objects to their own factory. For example, a custom {@link
     * CatalogTable} can be processed by a custom {@link DynamicTableFactory}.
     *
     *
Because all factories are interfaces, the returned {@link Factory} instance can implement
     * multiple supported extension points. An {@code instanceof} check is performed by the caller
     * that checks whether a required factory is implemented; otherwise the discovery process is
     * used.
     */
    default Optional<Factory> getFactory() {
        return Optional.empty();
    }

    /**
     * Get an optional {@link TableFactory} instance that's responsible for generating table-related
     * instances stored in this catalog, instances such as source/sink.
     *
     * @return an optional TableFactory instance
     * @deprecated Use {@link #getFactory()} for the new factory stack. The new factory stack uses
     *     the new table sources and sinks defined in FLIP-95 and a slightly different discovery
     *     mechanism.
     */
    @Deprecated
    default Optional<TableFactory> getTableFactory() {
        return Optional.empty();
    }

    /**
     * Get an optional {@link FunctionDefinitionFactory} instance that's responsible for
     * instantiating function definitions.
     *
     * @return an optional FunctionDefinitionFactory instance
     */
    default Optional<FunctionDefinitionFactory> getFunctionDefinitionFactory() {
        return Optional.empty();
    }

    /**
     * Open the catalog. Used for any required preparation in initialization phase.
     *
     * @throws CatalogException in case of any runtime exception
     */
    void open() throws CatalogException;

    /**
     * Close the catalog when it is no longer needed and release any resource that it might be
     * holding.
     *
     * @throws CatalogException in case of any runtime exception
     */
    void close() throws CatalogException;

    // ------ databases ------

    /**
     * Get the name of the default database for this catalog. The default database will be the
     * current database for the catalog when user's session doesn't specify a current database. The
     * value probably comes from configuration, will not change for the life time of the catalog
     * instance.
     *
     * @return the name of the current database
     * @throws CatalogException in case of any runtime exception
     */
    String getDefaultDatabase() throws CatalogException;

    /**
     * Get the names of all databases in this catalog.
     *
     * @return a list of the names of all databases
     * @throws CatalogException in case of any runtime exception
     */
    List<String> listDatabases() throws CatalogException;

    /**
     * Get a database from this catalog.
     *
     * @param databaseName Name of the database
     * @return The requested database
     * @throws DatabaseNotExistException if the database does not exist
     * @throws CatalogException in case of any runtime exception
     */
    CatalogDatabase getDatabase(String databaseName)
            throws DatabaseNotExistException, CatalogException;

    /**
     * Check if a database exists in this catalog.
     *
     * @param databaseName Name of the database
     * @return true if the given database exists in the catalog false otherwise
     * @throws CatalogException in case of any runtime exception
     */
    boolean databaseExists(String databaseName) throws CatalogException;

    /**
     * Create a database.
     *
     * @param name Name of the database to be created
     * @param database The database definition
     * @param ignoreIfExists Flag to specify behavior when a database with the given name already
     *     exists: if set to false, throw a DatabaseAlreadyExistException, if set to true, do
     *     nothing.
     * @throws DatabaseAlreadyExistException if the given database already exists and ignoreIfExists
     *     is false
     * @throws CatalogException in case of any runtime exception
     */
    void createDatabase(String name, CatalogDatabase database, boolean ignoreIfExists)
            throws DatabaseAlreadyExistException, CatalogException;

    /**
     * Drop a database.
     *
     * @param name Name of the database to be dropped.
     * @param ignoreIfNotExists Flag to specify behavior when the database does not exist: if set to
     *     false, throw an exception, if set to true, do nothing.
     * @throws DatabaseNotExistException if the given database does not exist
     * @throws CatalogException in case of any runtime exception
     */
    default void dropDatabase(String name, boolean ignoreIfNotExists)
            throws DatabaseNotExistException, DatabaseNotEmptyException, CatalogException {
        dropDatabase(name, ignoreIfNotExists, false);
    }

    /**
     * Drop a database.
     *
     * @param name Name of the database to be dropped.
     * @param ignoreIfNotExists Flag to specify behavior when the database does not exist: if set to
     *     false, throw an exception, if set to true, do nothing.
     * @param cascade Flag to specify behavior when the database contains table or function: if set
     *     to true, delete all tables and functions in the database and then delete the database, if
     *     set to false, throw an exception.
     * @throws DatabaseNotExistException if the given database does not exist
     * @throws DatabaseNotEmptyException if the given database is not empty and isRestrict is true
     * @throws CatalogException in case of any runtime exception
     */
    void dropDatabase(String name, boolean ignoreIfNotExists, boolean cascade)
            throws DatabaseNotExistException, DatabaseNotEmptyException, CatalogException;

    /**
     * Modify an existing database.
     *
     * @param name Name of the database to be modified
     * @param newDatabase The new database definition
     * @param ignoreIfNotExists Flag to specify behavior when the given database does not exist: if
     *     set to false, throw an exception, if set to true, do nothing.
     * @throws DatabaseNotExistException if the given database does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void alterDatabase(String name, CatalogDatabase newDatabase, boolean ignoreIfNotExists)
            throws DatabaseNotExistException, CatalogException;

    // ------ tables and views ------

    /**
     * Get names of all tables and views under this database. An empty list is returned if none
     * exists.
     *
     * @return a list of the names of all tables and views in this database
     * @throws DatabaseNotExistException if the database does not exist
     * @throws CatalogException in case of any runtime exception
     */
    List<String> listTables(String databaseName) throws DatabaseNotExistException, CatalogException;

    /**
     * Get names of all views under this database. An empty list is returned if none exists.
     *
     * @param databaseName the name of the given database
     * @return a list of the names of all views in the given database
     * @throws DatabaseNotExistException if the database does not exist
     * @throws CatalogException in case of any runtime exception
     */
    List<String> listViews(String databaseName) throws DatabaseNotExistException, CatalogException;

    /**
     * Returns a {@link CatalogTable} or {@link CatalogView} identified by the given {@link
     * ObjectPath}. The framework will resolve the metadata objects when necessary.
     *
     * @param tablePath Path of the table or view
     * @return The requested table or view
     * @throws TableNotExistException if the target does not exist
     * @throws CatalogException in case of any runtime exception
     */
    CatalogBaseTable getTable(ObjectPath tablePath) throws TableNotExistException, CatalogException;

    /**
     * Check if a table or view exists in this catalog.
     *
     * @param tablePath Path of the table or view
     * @return true if the given table exists in the catalog false otherwise
     * @throws CatalogException in case of any runtime exception
     */
    boolean tableExists(ObjectPath tablePath) throws CatalogException;

    /**
     * Drop a table or view.
     *
     * @param tablePath Path of the table or view to be dropped
     * @param ignoreIfNotExists Flag to specify behavior when the table or view does not exist: if
     *     set to false, throw an exception, if set to true, do nothing.
     * @throws TableNotExistException if the table or view does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void dropTable(ObjectPath tablePath, boolean ignoreIfNotExists)
            throws TableNotExistException, CatalogException;

    /**
     * Rename an existing table or view.
     *
     * @param tablePath Path of the table or view to be renamed
     * @param newTableName the new name of the table or view
     * @param ignoreIfNotExists Flag to specify behavior when the table or view does not exist: if
     *     set to false, throw an exception, if set to true, do nothing.
     * @throws TableNotExistException if the table does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void renameTable(ObjectPath tablePath, String newTableName, boolean ignoreIfNotExists)
            throws TableNotExistException, TableAlreadyExistException, CatalogException;

    /**
     * Creates a new table or view.
     *
     *
The framework will make sure to call this method with fully validated {@link
     * ResolvedCatalogTable} or {@link ResolvedCatalogView}. Those instances are easy to serialize
     * for a durable catalog implementation.
     *
     * @param tablePath path of the table or view to be created
     * @param table the table definition
     * @param ignoreIfExists flag to specify behavior when a table or view already exists at the
     *     given path: if set to false, it throws a TableAlreadyExistException, if set to true, do
     *     nothing.
     * @throws TableAlreadyExistException if table already exists and ignoreIfExists is false
     * @throws DatabaseNotExistException if the database in tablePath doesn't exist
     * @throws CatalogException in case of any runtime exception
     */
    void createTable(ObjectPath tablePath, CatalogBaseTable table, boolean ignoreIfExists)
            throws TableAlreadyExistException, DatabaseNotExistException, CatalogException;

    /**
     * Modifies an existing table or view. Note that the new and old {@link CatalogBaseTable} must
     * be of the same kind. For example, this doesn't allow altering a regular table to partitioned
     * table, or altering a view to a table, and vice versa.
     *
     *
The framework will make sure to call this method with fully validated {@link
     * ResolvedCatalogTable} or {@link ResolvedCatalogView}. Those instances are easy to serialize
     * for a durable catalog implementation.
     *
     * @param tablePath path of the table or view to be modified
     * @param newTable the new table definition
     * @param ignoreIfNotExists flag to specify behavior when the table or view does not exist: if
     *     set to false, throw an exception, if set to true, do nothing.
     * @throws TableNotExistException if the table does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void alterTable(ObjectPath tablePath, CatalogBaseTable newTable, boolean ignoreIfNotExists)
            throws TableNotExistException, CatalogException;

    // ------ partitions ------

    /**
     * Get CatalogPartitionSpec of all partitions of the table.
     *
     * @param tablePath path of the table
     * @return a list of CatalogPartitionSpec of the table
     * @throws TableNotExistException thrown if the table does not exist in the catalog
     * @throws TableNotPartitionedException thrown if the table is not partitioned
     * @throws CatalogException in case of any runtime exception
     */
    List<CatalogPartitionSpec> listPartitions(ObjectPath tablePath)
            throws TableNotExistException, TableNotPartitionedException, CatalogException;

    /**
     * Get CatalogPartitionSpec of all partitions that is under the given CatalogPartitionSpec in
     * the table.
     *
     * @param tablePath path of the table
     * @param partitionSpec the partition spec to list
     * @return a list of CatalogPartitionSpec that is under the given CatalogPartitionSpec in the
     *     table
     * @throws TableNotExistException thrown if the table does not exist in the catalog
     * @throws TableNotPartitionedException thrown if the table is not partitioned
     * @throws CatalogException in case of any runtime exception
     */
    List<CatalogPartitionSpec> listPartitions(
            ObjectPath tablePath, CatalogPartitionSpec partitionSpec)
            throws TableNotExistException, TableNotPartitionedException,
                    PartitionSpecInvalidException, CatalogException;

    /**
     * Get CatalogPartitionSpec of partitions by expression filters in the table.
     *
     *
NOTE: For FieldReferenceExpression, the field index is based on schema of this table
     * instead of partition columns only.
     *
     *
The passed in predicates have been translated in conjunctive form.
     *
     *
If catalog does not support this interface at present, throw an {@link
     * UnsupportedOperationException} directly. If the catalog does not have a valid filter, throw
     * the {@link UnsupportedOperationException} directly. Planner will fallback to get all
     * partitions and filter by itself.
     *
     * @param tablePath path of the table
     * @param filters filters to push down filter to catalog
     * @return a list of CatalogPartitionSpec that is under the given CatalogPartitionSpec in the
     *     table
     * @throws TableNotExistException thrown if the table does not exist in the catalog
     * @throws TableNotPartitionedException thrown if the table is not partitioned
     * @throws CatalogException in case of any runtime exception
     */
    List<CatalogPartitionSpec> listPartitionsByFilter(
            ObjectPath tablePath, List<Expression> filters)
            throws TableNotExistException, TableNotPartitionedException, CatalogException;

    /**
     * Get a partition of the given table. The given partition spec keys and values need to be
     * matched exactly for a result.
     *
     * @param tablePath path of the table
     * @param partitionSpec partition spec of partition to get
     * @return the requested partition
     * @throws PartitionNotExistException thrown if the partition doesn't exist
     * @throws CatalogException in case of any runtime exception
     */
    CatalogPartition getPartition(ObjectPath tablePath, CatalogPartitionSpec partitionSpec)
            throws PartitionNotExistException, CatalogException;

    /**
     * Check whether a partition exists or not.
     *
     * @param tablePath path of the table
     * @param partitionSpec partition spec of the partition to check
     * @throws CatalogException in case of any runtime exception
     */
    boolean partitionExists(ObjectPath tablePath, CatalogPartitionSpec partitionSpec)
            throws CatalogException;

    /**
     * Create a partition.
     *
     * @param tablePath path of the table.
     * @param partitionSpec partition spec of the partition
     * @param partition the partition to add.
     * @param ignoreIfExists flag to specify behavior if a table with the given name already exists:
     *     if set to false, it throws a TableAlreadyExistException, if set to true, nothing happens.
     * @throws TableNotExistException thrown if the target table does not exist
     * @throws TableNotPartitionedException thrown if the target table is not partitioned
     * @throws PartitionSpecInvalidException thrown if the given partition spec is invalid
     * @throws PartitionAlreadyExistsException thrown if the target partition already exists
     * @throws CatalogException in case of any runtime exception
     */
    void createPartition(
            ObjectPath tablePath,
            CatalogPartitionSpec partitionSpec,
            CatalogPartition partition,
            boolean ignoreIfExists)
            throws TableNotExistException, TableNotPartitionedException,
                    PartitionSpecInvalidException, PartitionAlreadyExistsException,
                    CatalogException;

    /**
     * Drop a partition.
     *
     * @param tablePath path of the table.
     * @param partitionSpec partition spec of the partition to drop
     * @param ignoreIfNotExists flag to specify behavior if the database does not exist: if set to
     *     false, throw an exception, if set to true, nothing happens.
     * @throws PartitionNotExistException thrown if the target partition does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void dropPartition(
            ObjectPath tablePath, CatalogPartitionSpec partitionSpec, boolean ignoreIfNotExists)
            throws PartitionNotExistException, CatalogException;

    /**
     * Alter a partition.
     *
     * @param tablePath path of the table
     * @param partitionSpec partition spec of the partition
     * @param newPartition new partition to replace the old one
     * @param ignoreIfNotExists flag to specify behavior if the database does not exist: if set to
     *     false, throw an exception, if set to true, nothing happens.
     * @throws PartitionNotExistException thrown if the target partition does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void alterPartition(
            ObjectPath tablePath,
            CatalogPartitionSpec partitionSpec,
            CatalogPartition newPartition,
            boolean ignoreIfNotExists)
            throws PartitionNotExistException, CatalogException;

    // ------ functions ------

    /**
     * List the names of all functions in the given database. An empty list is returned if none is
     * registered.
     *
     * @param dbName name of the database.
     * @return a list of the names of the functions in this database
     * @throws DatabaseNotExistException if the database does not exist
     * @throws CatalogException in case of any runtime exception
     */
    List<String> listFunctions(String dbName) throws DatabaseNotExistException, CatalogException;

    /**
     * Get the function. Function name should be handled in a case insensitive way.
     *
     * @param functionPath path of the function
     * @return the requested function
     * @throws FunctionNotExistException if the function does not exist in the catalog
     * @throws CatalogException in case of any runtime exception
     */
    CatalogFunction getFunction(ObjectPath functionPath)
            throws FunctionNotExistException, CatalogException;

    /**
     * Check whether a function exists or not. Function name should be handled in a case insensitive
     * way.
     *
     * @param functionPath path of the function
     * @return true if the function exists in the catalog false otherwise
     * @throws CatalogException in case of any runtime exception
     */
    boolean functionExists(ObjectPath functionPath) throws CatalogException;

    /**
     * Create a function. Function name should be handled in a case insensitive way.
     *
     * @param functionPath path of the function
     * @param function the function to be created
     * @param ignoreIfExists flag to specify behavior if a function with the given name already
     *     exists: if set to false, it throws a FunctionAlreadyExistException, if set to true,
     *     nothing happens.
     * @throws FunctionAlreadyExistException if the function already exist
     * @throws DatabaseNotExistException if the given database does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void createFunction(ObjectPath functionPath, CatalogFunction function, boolean ignoreIfExists)
            throws FunctionAlreadyExistException, DatabaseNotExistException, CatalogException;

    /**
     * Modify an existing function. Function name should be handled in a case insensitive way.
     *
     * @param functionPath path of the function
     * @param newFunction the function to be modified
     * @param ignoreIfNotExists flag to specify behavior if the function does not exist: if set to
     *     false, throw an exception if set to true, nothing happens
     * @throws FunctionNotExistException if the function does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void alterFunction(
            ObjectPath functionPath, CatalogFunction newFunction, boolean ignoreIfNotExists)
            throws FunctionNotExistException, CatalogException;

    /**
     * Drop a function. Function name should be handled in a case insensitive way.
     *
     * @param functionPath path of the function to be dropped
     * @param ignoreIfNotExists plag to specify behavior if the function does not exist: if set to
     *     false, throw an exception if set to true, nothing happens
     * @throws FunctionNotExistException if the function does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void dropFunction(ObjectPath functionPath, boolean ignoreIfNotExists)
            throws FunctionNotExistException, CatalogException;

    // ------ statistics ------

    /**
     * Get the statistics of a table.
     *
     * @param tablePath path of the table
     * @return statistics of the given table
     * @throws TableNotExistException if the table does not exist in the catalog
     * @throws CatalogException in case of any runtime exception
     */
    CatalogTableStatistics getTableStatistics(ObjectPath tablePath)
            throws TableNotExistException, CatalogException;

    /**
     * Get the column statistics of a table.
     *
     * @param tablePath path of the table
     * @return column statistics of the given table
     * @throws TableNotExistException if the table does not exist in the catalog
     * @throws CatalogException in case of any runtime exception
     */
    CatalogColumnStatistics getTableColumnStatistics(ObjectPath tablePath)
            throws TableNotExistException, CatalogException;

    /**
     * Get the statistics of a partition.
     *
     * @param tablePath path of the table
     * @param partitionSpec partition spec of the partition
     * @return statistics of the given partition
     * @throws PartitionNotExistException if the partition does not exist
     * @throws CatalogException in case of any runtime exception
     */
    CatalogTableStatistics getPartitionStatistics(
            ObjectPath tablePath, CatalogPartitionSpec partitionSpec)
            throws PartitionNotExistException, CatalogException;

    /**
     * Get the column statistics of a partition.
     *
     * @param tablePath path of the table
     * @param partitionSpec partition spec of the partition
     * @return column statistics of the given partition
     * @throws PartitionNotExistException if the partition does not exist
     * @throws CatalogException in case of any runtime exception
     */
    CatalogColumnStatistics getPartitionColumnStatistics(
            ObjectPath tablePath, CatalogPartitionSpec partitionSpec)
            throws PartitionNotExistException, CatalogException;

    /**
     * Update the statistics of a table.
     *
     * @param tablePath path of the table
     * @param tableStatistics new statistics to update
     * @param ignoreIfNotExists flag to specify behavior if the table does not exist: if set to
     *     false, throw an exception, if set to true, nothing happens.
     * @throws TableNotExistException if the table does not exist in the catalog
     * @throws CatalogException in case of any runtime exception
     */
    void alterTableStatistics(
            ObjectPath tablePath, CatalogTableStatistics tableStatistics, boolean ignoreIfNotExists)
            throws TableNotExistException, CatalogException;

    /**
     * Update the column statistics of a table.
     *
     * @param tablePath path of the table
     * @param columnStatistics new column statistics to update
     * @param ignoreIfNotExists flag to specify behavior if the table does not exist: if set to
     *     false, throw an exception, if set to true, nothing happens.
     * @throws TableNotExistException if the table does not exist in the catalog
     * @throws CatalogException in case of any runtime exception
     */
    void alterTableColumnStatistics(
            ObjectPath tablePath,
            CatalogColumnStatistics columnStatistics,
            boolean ignoreIfNotExists)
            throws TableNotExistException, CatalogException, TablePartitionedException;

    /**
     * Update the statistics of a table partition.
     *
     * @param tablePath path of the table
     * @param partitionSpec partition spec of the partition
     * @param partitionStatistics new statistics to update
     * @param ignoreIfNotExists flag to specify behavior if the partition does not exist: if set to
     *     false, throw an exception, if set to true, nothing happens.
     * @throws PartitionNotExistException if the partition does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void alterPartitionStatistics(
            ObjectPath tablePath,
            CatalogPartitionSpec partitionSpec,
            CatalogTableStatistics partitionStatistics,
            boolean ignoreIfNotExists)
            throws PartitionNotExistException, CatalogException;

    /**
     * Update the column statistics of a table partition.
     *
     * @param tablePath path of the table
     * @param partitionSpec partition spec of the partition @@param columnStatistics new column
     *     statistics to update
     * @param ignoreIfNotExists flag to specify behavior if the partition does not exist: if set to
     *     false, throw an exception, if set to true, nothing happens.
     * @throws PartitionNotExistException if the partition does not exist
     * @throws CatalogException in case of any runtime exception
     */
    void alterPartitionColumnStatistics(
            ObjectPath tablePath,
            CatalogPartitionSpec partitionSpec,
            CatalogColumnStatistics columnStatistics,
            boolean ignoreIfNotExists)
            throws PartitionNotExistException, CatalogException;
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Example</title>
<script type="text/javascript" src="root.js"></script>
<script type="text/javascript" src="level1/level1.js"></script>
</head>
<body>
Test
</body>
</html>


text:
 {{ 'TITLE.UID_TAG' | translate }} {{ 'UID.UNIQUE_IDENTIFICATION_TAG' | translate }}

		<form class="form-inline">

				{{ 'SYSTEM.SEARCH' | translate }}
				<input type="text" class="form-control ng-pristine ng-valid input-sm ng-valid"
				ng-model="query" id="search" placeholder="{{ 'SYSTEM.SEARCH' | translate }}" ng-model="query"
				ng-change="updateFilteredList()"/>

		</form>

          {{ 'UID.NAME' | translate }}:[{{item.sensor.nameWithNode}}], {{ 'UID.ID' | translate }}:[{{ 'UID.NODE' | translate }}:{{item.sensor.node.id}}, {{ 'UID.SENSOR' | translate }}:{{item.sensor.sensorId}}]

		<at-pagination class="pull-right" at-list="filteredList" at-config="config"></at-pagination>


text:
package gojsondiff_test

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	"testing"
)

func TestGojsondiff(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Gojsondiff Suite")
}


text:
<?php
session_start();

    // Starta dokumentet.
    require("subrutiner/head.php");
    echo "
";

    // Skriv ut bibliotekets exlibris på sidan.
    require("subrutiner/top_exlibris.php");

    // Ta reda på vilket steg av sidan som ska tas.
	$Steg = $_GET['Steg'];
    if (!isset($_GET['Typ'])) $Typ = "Vanligt";
    else $Typ = $_GET['Typ'];

    // "Vanligt" = vanligt medlemslån. "Reception" = receptionslån. "Special" = speciallån.

	// Töm SESSION på gammal data för att ingen gammal låntagare ska ligga kvar och slaska men spara biblioteket.
	$Bibliotek = $_SESSION['Bibliotek'];
	unset($_SESSION['Lantagarenamn']);
	unset($_SESSION['Lantagaregrad']);
	unset($_SESSION['Lantagareloge']);
	unset($_SESSION['Lantagaremedlem']);
	unset($_SESSION['Lantagareort']);
	unset($_SESSION['Lantagaremail']);
	$_SESSION['Bibliotek'] = "$Bibliotek";

	// Skriv ut instruktioner.
    if ($Typ == "Reception") {
    	if ($Steg == "RFID") echo "
Använd den här funktionen för att låna ut en bok till en nyrecepierad broder i grad II eller högre.

";
    	if ($Steg == "Temp") echo "
Använd den här funktionen för att låna ut en bok till en nyrecepierad broder i grad II eller högre.

";
	}

    if ($Typ == "Special") {
    	if ($Steg == "RFID") echo "
Använd den här funktionen för att speciallåna ut böcker.

";
    	if ($Steg == "Temp") echo "
Använd den här funktionen för att speciallåna ut böcker.

";
	}

	if ($Steg == "RFID") echo "
Scanna av låntagarens medlemskort eller tryck Tillbaka.

";
	else echo "
Skriv in låntagarens medlemsnummer eller tryck Tillbaka.

";

	// Öppna ett formulär för kortnumret.
	echo "<form action='medlem.php?Steg=".$Steg."&Typ=".$Typ."' name='medlem' method='post' enctype='application/form-data'>";

	// Kontrollera om man loggar in via "Sök broder" och hämta upp kortnumret i så fall.
	if(isset($_GET['Inlogg'])) {
		$Inlogg = $_GET['Inlogg'];
	}
	else $Inlogg = "";

	// Skriv ut en inmatningsruta för kortnumret och fyll i kortnumret om man kommer från "Sök broder"-funktionen.
	echo "<input name='nummer' type='text' class='Text' size='50' value='$Inlogg'>
";

	// Skriv ut knappar för att "Registrera" och "Tillbaka".
	echo "<input type='submit' value='Registrera' class='Text'>";
    if ($Typ == "Vanligt") echo "<input type='button' name='Cancel' value='Tillbaka' onclick='window.location.href = \"fm.php\" ' class='Text' />";
    if ($Typ <> "Vanligt") echo "<input type='button' name='Cancel' value='Tillbaka' onclick='window.location.href = \"administration/administrera.php\" ' class='Text' />";

	// Skriv ut en knapp för att söka efter en broder som inte har sitt kort med sig.
	if ($Typ == "Vanligt") echo "<button type='button' onClick='parent.location=\"administration/medlem_hantering.php?Steg=Sok\"' class='Text'>Sök broder</button>";

    // Avsluta formuläret.
    echo "</form>
";

	// Skriv ut en rad om sökningen.
	if ($Typ == "Vanligt") {
        // Skriv ut en hjälpknapp.
        $HELPID = 6;
        require ("subrutiner/help.php");
	}

	if ($Typ == "Special") {
        // Skriv ut en hjälpknapp.
        $HELPID = 9;
        require ("subrutiner/help.php");
	}

	if ($Typ == "Reception") {
        // Skriv ut en hjälpknapp.
        $HELPID = 10;
        require ("subrutiner/help.php");
	}

	// Skriv ut information om special- och receptionslån.
#	if ($Typ <> "Vanligt") echo "

Skriv in broderns medlemsnummer om han glömt sitt medlemskort för special- och receptionslån.";

	// Sätt fokus på inmatningsrutan så att markören alltid står där från början.
	echo "";

    // Avsluta dokumentet.
    echo "
";

	// Kontrollera kortnumret och hitta medlemmen i databasen om numret är okej.
	if (isset($_POST['nummer'])) {

		// Hämta information om medlemmen från databasen medlem.
		$MEDLEMKORT	 = $_POST['nummer'];

        // Kontrollera så att strängen inte är tom.
        if (!empty($MEDLEMSKORT)) {
            header("location:medlem.php?Steg=$Steg&Typ=$Typ");
            exit();
        }

		// Undersök strängen för att avgöra om det inscannats ett kortnummer eller skrivits in ett medlemsnummer.
		if (strlen($MEDLEMKORT) == 12) $Steg = "RFID";
        if (substr($MEDLEMKORT,4,1) == "-") $Steg = "Temp";

        // Fyll på med nollor i början kortnumret om det saknas.
        if ($Steg <> "Temp" && strlen($MEDLEMKORT) <> 12) {
            $Stranglangd = strlen($MEDLEMKORT);
            if ($Stranglangd == 9) $MEDLEMKORT = "000$MEDLEMKORT";
            if ($Stranglangd == 10) $MEDLEMKORT = "00$MEDLEMKORT";
            if ($Stranglangd == 11) $MEDLEMKORT = "0$MEDLEMKORT";
            $Steg = "RFID";
		}

		if ($Steg == "RFID") $Hamtamedlem = "SELECT * FROM medlem WHERE MEDLEMKORT = $MEDLEMKORT";
		if ($Steg == "Temp" || $Steg == "") {
			$MEDLEMKORT = str_replace("-", "", $MEDLEMKORT);
			$Hamtamedlem = "SELECT * FROM medlem WHERE MEDLEM = $MEDLEMKORT";
		}
		// Skicka begäran till databasen. Stoppa och visa felet om något går snett.
		if (!$result = mysqli_query($db,$Hamtamedlem)) {
			die('Invalid query: ' . mysqli_error($db));
		}

		// Varna om man skrivit in ett medlemsnummer som inte finns registrerat.
		if (!mysqli_num_rows($result)) {
			if ($Steg == "RFID") header("location:varning.php?Varning=200");
			if ($Steg == "Temp") header("location:varning.php?Varning=200");
		}
		else {

			// Läs data om låntagaren i databasen medlem.
			while ($row = mysqli_fetch_array($result)) {
				$Lantagaremedlem= $row["MEDLEM"];
				$Lantagarenamn	= $row["MEDLEMFNAMN"]." ".$row["MEDLEMNAMN"];
				$Lantagaregrad	= $row["MEDLEMGRAD"];
				$Lantagareloge	= $row["MEDLEMLOGE"];
				$Lantagaremail	= $row["MEDLEMMAIL"];
				$Lantagareort	= $row["MEDLEMORT"];
			}

			// Skriv ut låntagarens grad i klartext.
			if ($Lantagaregrad == 1) $Grad = ", I";
			if ($Lantagaregrad == 2) $Grad = ", II";
			if ($Lantagaregrad == 3) $Grad = ", III";
			if ($Lantagaregrad == 4) $Grad = ", IV-V";
			if ($Lantagaregrad == 6) $Grad = ", VI";
			if ($Lantagaregrad == 7) $Grad = ", VII";
			if ($Lantagaregrad == 8) $Grad = ", VIII";
			if ($Lantagaregrad == 9) $Grad = ", IX";
			if ($Lantagaregrad == 10) $Grad = ", X";
			if ($Lantagaregrad == 11) $Grad = ", XI";

			// Hämta låntagarens loge från databasen arbetsenheter och skriv ut den i klartext.
			$Hamtaloge = "SELECT * FROM arbetsenheter WHERE ENHETNR = $Lantagareloge";

			// Skicka begäran till databasen. Stoppa och visa felet om något går snett.
			if (!$result = mysqli_query($db,$Hamtaloge)) {
				die('Invalid query: ' . mysqli_error($db));
			}

			// Läs in logens namn från databasen arbetsenheter.
			while ($row = mysqli_fetch_array($result)) {
				$Lantagareloge = $row["ENHETNAMN"];
			}

			// Spara informationen om låntagaren i SESSIONs.
			$_SESSION['Lantagarenamn'] = $Lantagarenamn;
			$_SESSION['Lantagaregrad'] = $Lantagaregrad;
			$_SESSION['Lantagareloge'] = $Lantagareloge;
			$_SESSION['Lantagaremedlem'] = $Lantagaremedlem;
			$_SESSION['Lantagareort'] = $Lantagareort;
			$_SESSION['Lantagaremail'] = $Lantagaremail;
			$_SESSION['Grad'] = $Grad;

			// Kontrollera om besökarens medlemsnummer redan finns registrerat i besökslistan.
			$Kollabesokare = "SELECT * FROM besokslistan WHERE DATUM = $Serveridag AND MEDLEM = $Lantagaremedlem";

			// Skicka begäran till databasen. Stoppa och visa felet om något går snett.
			if (!$result = mysqli_query($db,$Kollabesokare)) {
				die('Invalid query: ' . mysqli_error($db));
			}

			// Om brodern inte står i besökslistan så skriv in honom.
			if (!mysqli_num_rows($result)) {

				// Spara besökarens medlemsnummer i besökslistan.
				$Skrivbesok = "INSERT INTO besokslistan (DATUM,MEDLEM,BIBLIOTEK) VALUES ('$Serveridag','$Lantagaremedlem','".$_SESSION['Bibliotek']."')";

				// Skicka skrivsträngen till databasen, stoppa och visa felet om något går galet.
				if (!$result = mysqli_query($db,$Skrivbesok)) {
					die('Invalid query: ' . mysqli_error($db));
				}
			}

			// Kontrollera om låntagaren står med på "Svarta listan".
#			$Kollasvartlistan = "SELECT * FROM svartalistan WHERE MEDLEM = $Lantagaremedlem";

			// Skicka begäran till databasen. Stoppa och visa felet om något går snett.
#			if (!$result = mysqli_query($db,$Kollasvartlistan)) {
#				die('Invalid query: ' . mysqli_error($db));
#			}

            // Om brodern är svartlistad så varna om detta.
#			if (mysqli_num_rows($result)) {
#				header("location:varning.php?Varning=123");
#			}

			// Hoppa till lånesidan för att fortsätta låneprocessen.
			echo "";
		}
	}
?>


text:
layout: tutorial
title: Advanced Google
date: 2017-02-12
tags: []
tagline: What google can do for you
description: Why solve a problem someone else has solved? Let Google do it and save your energy for other things.
image: /public/images/google.png
---

## Goal

Learning to Google like a pro. Use the worlds largest search engines to solve your problems.

## Requirements

* Able to open a new tab and search for something
* Able to copy and paste
* In this tutorial I use a lot of programming languages as examples, you don't need to know any of them to complete the challenges. Let Google do it all for you.

## What is Google?

Google is that kid that always knows the answer and puts up their hand 0.46s after the teach asks a question.

## How did Google get so smart?

Google reads hundreds of thousands of pages every day. And tries to organise everything so it can always find it again easily.

{:.challengeTitle}
## Challenge #1

> Use Google to solve these challenges. **HINT:** Useful things to search are in **bold**

The box below reads **javascript**. How would you make a pop up **alert box** that says `Hello World!`?

<input type="text" id="jsTestOne" placeholder="Put code here..."><button type="button" onclick="jsTestOne()">Submit</button>

Need some help?

{:.challengeTitle}
## Challenge #2

>In programming there lots of ways to solve the same problem. Google will still find the answer for you, but it might not be the first result.

See this poop? Which **css** style would **move** it to the right side of the **page**.

💩

<input placeholder="Put code here..." type="text" id="jsTestTwo"><button type="button" onclick="jsTestTwo()">Submit</button>

Need some help?

## How do I find the information I need?

Google gives you some handy sites, it's up to you to find the info you need.

Each website shows its data in its own way. Here are some common sites and tips to find what you are looking for.

**Stack Overflow** is one of your most powerful allies. It is kind of like yahoo answers but for coding. Just skim the question to see if it us like your problem and read the answers that have the **most votes**.

**W3Schools** has tons of info on HTML, CSS and javascript. The code and example sections are my favourite because that's where all the code is.

For **anything else** you can just skim the page or use Find (CMD+F or CTRL+F) on the page to search for keywords.

{:.challengeTitle}
## Challenge #3

The box below uses **python**. How do you **add an object to a list**?

[❤, ⚽, ☺, ✌]

<input placeholder="Put code here..." type="text" id="jsTestThree"><button type="button" onclick="jsTestThree()">Submit</button>

Need some help?

## Don't search for questions, search for answers

Google is starting to get better at matching questions to answers. But it's excellent at finding answers on their own.

Try searching for the answer on its own, think about how it would be phrased.

So instead of searching for `What is the land mass of Australia?`, try looking for the answer `Australia land mass`. Not only is it quicker to type in, but you will find it even if no one has asked the question.

If you are looking for something specific you can search for an answer using quotation marks. So instead of searching for `need to summon a druid, then sing me a song` you could search for `"Need to summon a Druid?" "Sing me a song"`.

{:.challengeTitle}
## Challenge #4

Who first said `"What doesn't kill you does a great job of making you look incompetent"`?

<input placeholder="Name goes here..." type="text" id="jsTestFour"><button type="button" onclick="jsTestFour()">Submit</button>

Need some help?

## Extra Super Powers

Google has a lot of other cool hidden stuff.

Try using an **asterisk (*)** as a wildcard to include everything.

>eg. `"Largest * in the world"`

Start your search with **site:** if you want to limit your search to a specific site.

>eg. `site:wikipedia.org swallow velocity`

You can also use **-** to remove something from search results.

>eg. `jaguar speed -car`

## Google in action!

So now that you know how to use Google, put it to work while you are coding.

It works for anything and everything. Not just scratch or HTML, but any question you have about anything.

Want to see how I use Google?

Here is a log of how I google when I am programming. Yep. Every few minutes I find something I haven't memorized and need to google it.

{:.challengeTitle}
## Challenge Result!

Keep up the awesome work, only 4 challenges left to complete.

I hope you enjoyed this 'How to Google' tutorial. If you have any questions or requests on things for next time then leave a comment for me down below.


text:
class GmailDotEmailGenerator:
  def __init__(self, email):
    self.__username__, self.__domain__ = email.split('@')
  def generate(self):
    return self.__generate__(self.__username__, self.__domain__)
  def __generate__(self, username, domain):
    emails = list()
    username_length = len(username)
    combinations = pow(2, username_length - 1)
    padding = "{0:0" + str(username_length - 1) + "b}"
    for i in range(0, combinations):
        bin = padding.format(i)
        full_email = ""

        for j in range(0, username_length - 1):
            full_email += (username[j]);
            if bin[j] == "1":
                full_email += "."
        full_email += (username[j + 1])
        emails.append(full_email + "@" + domain)
    return emails


text:
package org.apache.calcite.avatica.noop;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.RowIdLifetime;
import java.sql.SQLException;

/**
 * A {@link DatabaseMetaData} implementation which does nothing.
 */
public class AvaticaNoopDatabaseMetaData implements DatabaseMetaData {

  private static final AvaticaNoopDatabaseMetaData INSTANCE = new AvaticaNoopDatabaseMetaData();

  public static AvaticaNoopDatabaseMetaData getInstance() {
    return INSTANCE;
  }

  private AvaticaNoopDatabaseMetaData() {}

  private UnsupportedOperationException unsupported() {
    return new UnsupportedOperationException("Unsupported");
  }

  @Override public <T> T unwrap(Class<T> iface) throws SQLException {
    throw unsupported();
  }

  @Override public boolean isWrapperFor(Class<?> iface) throws SQLException {
    return false;
  }

  @Override public boolean allProceduresAreCallable() throws SQLException {
    return false;
  }

  @Override public boolean allTablesAreSelectable() throws SQLException {
    return false;
  }

  @Override public String getURL() throws SQLException {
    throw unsupported();
  }

  @Override public String getUserName() throws SQLException {
    throw unsupported();
  }

  @Override public boolean isReadOnly() throws SQLException {
    return false;
  }

  @Override public boolean nullsAreSortedHigh() throws SQLException {
    return false;
  }

  @Override public boolean nullsAreSortedLow() throws SQLException {
    return false;
  }

  @Override public boolean nullsAreSortedAtStart() throws SQLException {
    return false;
  }

  @Override public boolean nullsAreSortedAtEnd() throws SQLException {
    return false;
  }

  @Override public String getDatabaseProductName() throws SQLException {
    throw unsupported();
  }

  @Override public String getDatabaseProductVersion() throws SQLException {
    throw unsupported();
  }

  @Override public String getDriverName() throws SQLException {
    throw unsupported();
  }

  @Override public String getDriverVersion() throws SQLException {
    throw unsupported();
  }

  @Override public int getDriverMajorVersion() {
    return 0;
  }

  @Override public int getDriverMinorVersion() {
    return 0;
  }

  @Override public boolean usesLocalFiles() throws SQLException {
    return false;
  }

  @Override public boolean usesLocalFilePerTable() throws SQLException {
    return false;
  }

  @Override public boolean supportsMixedCaseIdentifiers() throws SQLException {
    return false;
  }

  @Override public boolean storesUpperCaseIdentifiers() throws SQLException {
    return false;
  }

  @Override public boolean storesLowerCaseIdentifiers() throws SQLException {
    return false;
  }

  @Override public boolean storesMixedCaseIdentifiers() throws SQLException {
    return false;
  }

  @Override public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
    return false;
  }

  @Override public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
    return false;
  }

  @Override public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
    return false;
  }

  @Override public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
    return false;
  }

  @Override public String getIdentifierQuoteString() throws SQLException {
    throw unsupported();
  }

  @Override public String getSQLKeywords() throws SQLException {
    throw unsupported();
  }

  @Override public String getNumericFunctions() throws SQLException {
    throw unsupported();
  }

  @Override public String getStringFunctions() throws SQLException {
    throw unsupported();
  }

  @Override public String getSystemFunctions() throws SQLException {
    throw unsupported();
  }

  @Override public String getTimeDateFunctions() throws SQLException {
    throw unsupported();
  }

  @Override public String getSearchStringEscape() throws SQLException {
    throw unsupported();
  }

  @Override public String getExtraNameCharacters() throws SQLException {
    throw unsupported();
  }

  @Override public boolean supportsAlterTableWithAddColumn() throws SQLException {
    return false;
  }

  @Override public boolean supportsAlterTableWithDropColumn() throws SQLException {
    return false;
  }

  @Override public boolean supportsColumnAliasing() throws SQLException {
    return false;
  }

  @Override public boolean nullPlusNonNullIsNull() throws SQLException {
    return false;
  }

  @Override public boolean supportsConvert() throws SQLException {
    return false;
  }

  @Override public boolean supportsConvert(int fromType, int toType) throws SQLException {
    return false;
  }

  @Override public boolean supportsTableCorrelationNames() throws SQLException {
    return false;
  }

  @Override public boolean supportsDifferentTableCorrelationNames() throws SQLException {
    return false;
  }

  @Override public boolean supportsExpressionsInOrderBy() throws SQLException {
    return false;
  }

  @Override public boolean supportsOrderByUnrelated() throws SQLException {
    return false;
  }

  @Override public boolean supportsGroupBy() throws SQLException {
    return false;
  }

  @Override public boolean supportsGroupByUnrelated() throws SQLException {
    return false;
  }

  @Override public boolean supportsGroupByBeyondSelect() throws SQLException {
    return false;
  }

  @Override public boolean supportsLikeEscapeClause() throws SQLException {
    return false;
  }

  @Override public boolean supportsMultipleResultSets() throws SQLException {
    return false;
  }

  @Override public boolean supportsMultipleTransactions() throws SQLException {
    return false;
  }

  @Override public boolean supportsNonNullableColumns() throws SQLException {
    return false;
  }

  @Override public boolean supportsMinimumSQLGrammar() throws SQLException {
    return false;
  }

  @Override public boolean supportsCoreSQLGrammar() throws SQLException {
    return false;
  }

  @Override public boolean supportsExtendedSQLGrammar() throws SQLException {
    return false;
  }

  @Override public boolean supportsANSI92EntryLevelSQL() throws SQLException {
    return false;
  }

  @Override public boolean supportsANSI92IntermediateSQL() throws SQLException {
    return false;
  }

  @Override public boolean supportsANSI92FullSQL() throws SQLException {
    return false;
  }

  @Override public boolean supportsIntegrityEnhancementFacility() throws SQLException {
    return false;
  }

  @Override public boolean supportsOuterJoins() throws SQLException {
    return false;
  }

  @Override public boolean supportsFullOuterJoins() throws SQLException {
    return false;
  }

  @Override public boolean supportsLimitedOuterJoins() throws SQLException {
    return false;
  }

  @Override public String getSchemaTerm() throws SQLException {
    throw unsupported();
  }

  @Override public String getProcedureTerm() throws SQLException {
    throw unsupported();
  }

  @Override public String getCatalogTerm() throws SQLException {
    throw unsupported();
  }

  @Override public boolean isCatalogAtStart() throws SQLException {
    return false;
  }

  @Override public String getCatalogSeparator() throws SQLException {
    throw unsupported();
  }

  @Override public boolean supportsSchemasInDataManipulation() throws SQLException {
    return false;
  }

  @Override public boolean supportsSchemasInProcedureCalls() throws SQLException {
    return false;
  }

  @Override public boolean supportsSchemasInTableDefinitions() throws SQLException {
    return false;
  }

  @Override public boolean supportsSchemasInIndexDefinitions() throws SQLException {
    return false;
  }

  @Override public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
    return false;
  }

  @Override public boolean supportsCatalogsInDataManipulation() throws SQLException {
    return false;
  }

  @Override public boolean supportsCatalogsInProcedureCalls() throws SQLException {
    return false;
  }

  @Override public boolean supportsCatalogsInTableDefinitions() throws SQLException {
    return false;
  }

  @Override public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
    return false;
  }

  @Override public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
    return false;
  }

  @Override public boolean supportsPositionedDelete() throws SQLException {
    return false;
  }

  @Override public boolean supportsPositionedUpdate() throws SQLException {
    return false;
  }

  @Override public boolean supportsSelectForUpdate() throws SQLException {
    return false;
  }

  @Override public boolean supportsStoredProcedures() throws SQLException {
    return false;
  }

  @Override public boolean supportsSubqueriesInComparisons() throws SQLException {
    return false;
  }

  @Override public boolean supportsSubqueriesInExists() throws SQLException {
    return false;
  }

  @Override public boolean supportsSubqueriesInIns() throws SQLException {
    return false;
  }

  @Override public boolean supportsSubqueriesInQuantifieds() throws SQLException {
    return false;
  }

  @Override public boolean supportsCorrelatedSubqueries() throws SQLException {
    return false;
  }

  @Override public boolean supportsUnion() throws SQLException {
    return false;
  }

  @Override public boolean supportsUnionAll() throws SQLException {
    return false;
  }

  @Override public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
    return false;
  }

  @Override public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
    return false;
  }

  @Override public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
    return false;
  }

  @Override public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
    return false;
  }

  @Override public int getMaxBinaryLiteralLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxCharLiteralLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxColumnNameLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxColumnsInGroupBy() throws SQLException {
    return 0;
  }

  @Override public int getMaxColumnsInIndex() throws SQLException {
    return 0;
  }

  @Override public int getMaxColumnsInOrderBy() throws SQLException {
    return 0;
  }

  @Override public int getMaxColumnsInSelect() throws SQLException {
    return 0;
  }

  @Override public int getMaxColumnsInTable() throws SQLException {
    return 0;
  }

  @Override public int getMaxConnections() throws SQLException {
    return 0;
  }

  @Override public int getMaxCursorNameLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxIndexLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxSchemaNameLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxProcedureNameLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxCatalogNameLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxRowSize() throws SQLException {
    return 0;
  }

  @Override public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
    return false;
  }

  @Override public int getMaxStatementLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxStatements() throws SQLException {
    return 0;
  }

  @Override public int getMaxTableNameLength() throws SQLException {
    return 0;
  }

  @Override public int getMaxTablesInSelect() throws SQLException {
    return 0;
  }

  @Override public int getMaxUserNameLength() throws SQLException {
    return 0;
  }

  @Override public int getDefaultTransactionIsolation() throws SQLException {
    return 0;
  }

  @Override public boolean supportsTransactions() throws SQLException {
    return false;
  }

  @Override public boolean supportsTransactionIsolationLevel(int level) throws SQLException {
    return false;
  }

  @Override public boolean supportsDataDefinitionAndDataManipulationTransactions()
      throws SQLException {
    return false;
  }

  @Override public boolean supportsDataManipulationTransactionsOnly() throws SQLException {
    return false;
  }

  @Override public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
    return false;
  }

  @Override public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
    return false;
  }

  @Override public ResultSet getProcedures(String catalog, String schemaPattern,
      String procedureNamePattern) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getProcedureColumns(String catalog, String schemaPattern,
      String procedureNamePattern, String columnNamePattern) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getTables(String catalog, String schemaPattern,
      String tableNamePattern, String[] types) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getSchemas() throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getCatalogs() throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getTableTypes() throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getColumns(String catalog, String schemaPattern,
      String tableNamePattern, String columnNamePattern) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getColumnPrivileges(String catalog, String schema, String table,
      String columnNamePattern) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getTablePrivileges(String catalog, String schemaPattern,
      String tableNamePattern) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getBestRowIdentifier(String catalog, String schema, String table,
      int scope, boolean nullable) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getVersionColumns(String catalog, String schema, String table)
      throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getPrimaryKeys(String catalog, String schema, String table)
      throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getImportedKeys(String catalog, String schema, String table)
      throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getExportedKeys(String catalog, String schema, String table)
      throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getCrossReference(String parentCatalog, String parentSchema,
      String parentTable, String foreignCatalog, String foreignSchema,
      String foreignTable) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getTypeInfo() throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getIndexInfo(String catalog, String schema, String table,
      boolean unique, boolean approximate) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public boolean supportsResultSetType(int type) throws SQLException {
    return false;
  }

  @Override public boolean supportsResultSetConcurrency(int type, int concurrency)
      throws SQLException {
    return false;
  }

  @Override public boolean ownUpdatesAreVisible(int type) throws SQLException {
    return false;
  }

  @Override public boolean ownDeletesAreVisible(int type) throws SQLException {
    return false;
  }

  @Override public boolean ownInsertsAreVisible(int type) throws SQLException {
    return false;
  }

  @Override public boolean othersUpdatesAreVisible(int type) throws SQLException {
    return false;
  }

  @Override public boolean othersDeletesAreVisible(int type) throws SQLException {
    return false;
  }

  @Override public boolean othersInsertsAreVisible(int type) throws SQLException {
    return false;
  }

  @Override public boolean updatesAreDetected(int type) throws SQLException {
    return false;
  }

  @Override public boolean deletesAreDetected(int type) throws SQLException {
    return false;
  }

  @Override public boolean insertsAreDetected(int type) throws SQLException {
    return false;
  }

  @Override public boolean supportsBatchUpdates() throws SQLException {
    return false;
  }

  @Override public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern,
      int[] types) throws SQLException {
    throw unsupported();
  }

  @Override public Connection getConnection() throws SQLException {
    throw unsupported();
  }

  @Override public boolean supportsSavepoints() throws SQLException {
    return false;
  }

  @Override public boolean supportsNamedParameters() throws SQLException {
    return false;
  }

  @Override public boolean supportsMultipleOpenResults() throws SQLException {
    return false;
  }

  @Override public boolean supportsGetGeneratedKeys() throws SQLException {
    return false;
  }

  @Override public ResultSet getSuperTypes(String catalog, String schemaPattern,
      String typeNamePattern) throws SQLException {
    throw unsupported();
  }

  @Override public ResultSet getSuperTables(String catalog, String schemaPattern,
      String tableNamePattern) throws SQLException {
    throw unsupported();
  }

  @Override public ResultSet getAttributes(String catalog, String schemaPattern,
      String typeNamePattern, String attributeNamePattern) throws SQLException {
    throw unsupported();
  }

  @Override public boolean supportsResultSetHoldability(int holdability) throws SQLException {
    return false;
  }

  @Override public int getResultSetHoldability() throws SQLException {
    return 0;
  }

  @Override public int getDatabaseMajorVersion() throws SQLException {
    return 0;
  }

  @Override public int getDatabaseMinorVersion() throws SQLException {
    return 0;
  }

  @Override public int getJDBCMajorVersion() throws SQLException {
    return 0;
  }

  @Override public int getJDBCMinorVersion() throws SQLException {
    return 0;
  }

  @Override public int getSQLStateType() throws SQLException {
    return 0;
  }

  @Override public boolean locatorsUpdateCopy() throws SQLException {
    return false;
  }

  @Override public boolean supportsStatementPooling() throws SQLException {
    return false;
  }

  @Override public RowIdLifetime getRowIdLifetime() throws SQLException {
    throw unsupported();
  }

  @Override public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException {
    throw unsupported();
  }

  @Override public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
    return false;
  }

  @Override public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
    return false;
  }

  @Override public ResultSet getClientInfoProperties() throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getFunctions(String catalog, String schemaPattern,
      String functionNamePattern) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getFunctionColumns(String catalog, String schemaPattern,
      String functionNamePattern, String columnNamePattern) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public ResultSet getPseudoColumns(String catalog, String schemaPattern,
      String tableNamePattern, String columnNamePattern) throws SQLException {
    return AvaticaNoopResultSet.getInstance();
  }

  @Override public boolean generatedKeyAlwaysReturned() throws SQLException {
    return false;
  }
}

// End AvaticaNoopDatabaseMetaData.java


text:
package nlp_automl

//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)

// InvokeAction invokes the nlp_automl.InvokeAction API synchronously
func (client *Client) InvokeAction(request *InvokeActionRequest) (response *InvokeActionResponse, err error) {
	response = CreateInvokeActionResponse()
	err = client.DoAction(request, response)
	return
}

// InvokeActionWithChan invokes the nlp_automl.InvokeAction API asynchronously
func (client *Client) InvokeActionWithChan(request *InvokeActionRequest) (<-chan *InvokeActionResponse, <-chan error) {
	responseChan := make(chan *InvokeActionResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.InvokeAction(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}

// InvokeActionWithCallback invokes the nlp_automl.InvokeAction API asynchronously
func (client *Client) InvokeActionWithCallback(request *InvokeActionRequest, callback func(response *InvokeActionResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *InvokeActionResponse
		var err error
		defer close(result)
		response, err = client.InvokeAction(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}

// InvokeActionRequest is the request struct for api InvokeAction
type InvokeActionRequest struct {
	*requests.RpcRequest
	InvokeProduct string `position:"Query" name:"InvokeProduct"`
	InvokeAction  string `position:"Body" name:"InvokeAction"`
	InvokeParams  string `position:"Body" name:"InvokeParams"`
	InvokeRegion  string `position:"Query" name:"InvokeRegion"`
}

// InvokeActionResponse is the response struct for api InvokeAction
type InvokeActionResponse struct {
	*responses.BaseResponse
	Code      int    `json:"Code" xml:"Code"`
	Message   int    `json:"Message" xml:"Message"`
	Data      string `json:"Data" xml:"Data"`
	RequestId string `json:"RequestId" xml:"RequestId"`
}

// CreateInvokeActionRequest creates a request to invoke InvokeAction API
func CreateInvokeActionRequest() (request *InvokeActionRequest) {
	request = &InvokeActionRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("nlp-automl", "2019-07-01", "InvokeAction", "nlpautoml", "openAPI")
	request.Method = requests.POST
	return
}

// CreateInvokeActionResponse creates a response to parse from InvokeAction response
func CreateInvokeActionResponse() (response *InvokeActionResponse) {
	response = &InvokeActionResponse{
		BaseResponse: &responses.BaseResponse{},
	}
	return
}


text:
package com.playground.android_architect_playground.database.dao;

import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;

import com.playground.android_architect_playground.database.entitiy.RecordItem;

import java.util.List;

/**
 * Created by petnagy on 2017. 08. 10..
 */
@Dao
public interface PlanetsDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void save(RecordItem recordItem);

    @Query("SELECT * FROM planets ORDER BY id DESC")
    LiveData<List<RecordItem>> loadAllRecords();

    @Delete
    void delete(RecordItem item);
}


text:
<?php

/**
 * This file is part of Gitonomy.
 *
 * (c) Alexandre Salomé <alexandre.salome@gmail.com>
 * (c) Julien DIDIER <genzo.wm@gmail.com>
 *
 * This source file is subject to the GPL license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Gitonomy\Bundle\WebsiteBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class GitonomyWebsiteBundle extends Bundle
{
}


text:
'use strict';

/** @this */
var $$AnimateCacheProvider = function() {

  var KEY = '$$ngAnimateParentKey';
  var parentCounter = 0;
  var cache = Object.create(null);

  this.$get = [function() {
    return {
      cacheKey: function(node, method, addClass, removeClass) {
        var parentNode = node.parentNode;
        var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
        var parts = [parentID, method, node.getAttribute('class')];
        if (addClass) {
          parts.push(addClass);
        }
        if (removeClass) {
          parts.push(removeClass);
        }
        return parts.join(' ');
      },

      containsCachedAnimationWithoutDuration: function(key) {
        var entry = cache[key];

        // nothing cached, so go ahead and animate
        // otherwise it should be a valid animation
        return (entry && !entry.isValid) || false;
      },

      flush: function() {
        cache = Object.create(null);
      },

      count: function(key) {
        var entry = cache[key];
        return entry ? entry.total : 0;
      },

      get: function(key) {
        var entry = cache[key];
        return entry && entry.value;
      },

      put: function(key, value, isValid) {
        if (!cache[key]) {
          cache[key] = { total: 1, value: value, isValid: isValid };
        } else {
          cache[key].total++;
          cache[key].value = value;
        }
      }
    };
  }];
};


text:
Filter

				名稱 - by Name
				<input type="text" ng-model="search.name" name="name" />

				Publisher
				<select ui-select2="publisherSelectOption" ng-model="search.publisherId">
					<option value=""></option>
				    <option value="{{publisher._id}}" ng-repeat="publisher in publishersList">{{publisher.names|concatNames}}</option>
				</select>

			Languages
			<ui-group-checkbox
				ui-group-checkbox-model="search.langs"
				ui-group-checkbox-values="lyricLangs.values"
				ui-group-checkbox-labels="lyricLangs.displayNames">


text:
"use strict";

const { MoleculerError } 	 = require("../errors");
const Transporter 			 = require("./base");
const { BrokerOptionsError } = require("../errors");

/**
 * Transporter for Redis
 *
 * @class RedisTransporter
 * @extends {Transporter}
 */
class RedisTransporter extends Transporter {

	/**
	 * Creates an instance of RedisTransporter.
	 *
	 * @param {any} opts
	 *
	 * @memberof RedisTransporter
	 */
	constructor(opts) {
		super(opts);

		this.clientPub = null;
		this.clientSub = null;
	}

	/**
	 * Connect to the server
	 *
	 * @memberof RedisTransporter
	 */
	connect() {
		return new Promise((resolve, reject) => {
			let clientSub = this.getRedisClient(this.opts);
			this._clientSub = clientSub; // For tests

			clientSub.on("connect", () => {
				this.logger.info("Redis-sub client is connected.");

				let clientPub = this.getRedisClient(this.opts);
				this._clientPub = clientPub; // For tests

				clientPub.on("connect", () => {
					this.clientSub = clientSub;
					this.clientPub = clientPub;

					this.logger.info("Redis-pub client is connected.");

					this.onConnected().then(resolve);
				});

				/* istanbul ignore next */
				clientPub.on("error", (e) => {
					this.logger.error("Redis-pub error", e.message);
					this.logger.debug(e);

					if (!this.connected)
						reject(e);
				});

				/* istanbul ignore next */
				clientPub.on("close", () => {
					this.connected = false;
					this.logger.warn("Redis-pub client is disconnected.");
				});
			});

			clientSub.on("messageBuffer", (rawTopic, buf) => {
				const topic = rawTopic.toString().substring(this.prefix.length + 1);
				const cmd = topic.split(".")[0];
				this.receive(cmd, buf);
			});

			/* istanbul ignore next */
			clientSub.on("error", (e) => {
				this.logger.error("Redis-sub error", e.message);
				this.logger.debug(e);
			});

			/* istanbul ignore next */
			clientSub.on("close", () => {
				this.connected = false;
				this.logger.warn("Redis-sub client is disconnected.");
			});

		});
	}

	/**
	 * Disconnect from the server
	 *
	 * @memberof RedisTransporter
	 */
	disconnect() {
		if (this.clientSub) {
			this.clientSub.disconnect();
			this.clientSub = null;
		}

		if (this.clientPub) {
			this.clientPub.disconnect();
			this.clientPub = null;
		}
	}

	/**
	 * Subscribe to a command
	 *
	 * @param {String} cmd
	 * @param {String} nodeID
	 *
	 * @memberof RedisTransporter
	 */
	subscribe(cmd, nodeID) {
		this.clientSub.subscribe(this.getTopicName(cmd, nodeID));
		return this.broker.Promise.resolve();
	}

	/**
	 * Send data buffer.
	 *
	 * @param {String} topic
	 * @param {Buffer} data
	 * @param {Object} meta
	 *
	 * @returns {Promise}
	 */
	send(topic, data) {
		/* istanbul ignore next*/
		if (!this.clientPub) return this.broker.Promise.reject(new MoleculerError("Redis Client is not available"));

		this.clientPub.publish(topic, data);
		return this.broker.Promise.resolve();
	}

	/**
	 * Return redis or redis.cluster client
	 *
	 * @param {any} opts
	 *
	 * @memberof RedisTransporter
	 */
	getRedisClient(opts) {
		let client;
		let Redis;
		try {
			Redis = require("ioredis");
			Redis.Promise = this.broker.Promise;
		} catch(err) {
			/* istanbul ignore next */
			this.broker.fatal("The 'ioredis' package is missing. Please install it with 'npm install ioredis --save' command.", err, true);
		}
		if (opts && opts.cluster) {
			if (!opts.cluster.nodes || opts.cluster.nodes.length === 0) {
				throw new BrokerOptionsError("No nodes defined for cluster");
			}
			this.logger.info("Setting Redis.Cluster transporter");
			client = new Redis.Cluster(opts.cluster.nodes, opts.cluster.clusterOptions);
		} else {
			this.logger.info("Setting Redis transporter");
			client = new Redis(opts);
		}
		return client;
	}

}

module.exports = RedisTransporter;


text:
package lv.emes.libraries.communication;

/**
 * Class that holds algorithms, how to serialize or deserialize particular object.
 * Typically must be extended without creating any additional constructors to default one.
 * Then necessary methods must be implemented to determine, how serialization and deserialization needs to be performed.
 *
Public methods:
 *

 *
serialize

 *
deserialize

 *

 *
 * @param <T> object type that can be serialized.
 * @param <V> type of object after serialization (mostly String or some kind of JSON object).
 * @author eMeS
 * @version 1.0.
 * @since 2.2.4
 */
public abstract class MS_DTOMappingAlgorithm<T, V> {

    protected MS_DTOMappingAlgorithm() {
        // must-have no-arg constructor for MS_DTOMappingHelper needs
    }

    /**
     * Performs object serialization.
     *
     * @param objectToSerialize non-null object that should be serialized.
     * @return serialized object.
     */
    public abstract V serialize(T objectToSerialize);

    /**
     * Performs object deserialization.
     *
     * @param serializedObject already serialized non-null object that needs to be deserialized.
     * @return deserialized object.
     */
    public abstract T deserialize(V serializedObject);
}


text:
"use strict";

var SelectAllState = {
   NOT_CHECKED       : "notChecked",
   CHECKED           : "checked",
   PARTIALLY_CHECKED : "partiallyChecked"
};


text:
/**
 * Created by Kun on 7/14/2015.
 */

var manageUsers = {

    navigationArgs: {
    },

    init: function(){
        navigation.setTitle("Manage Users");
        //initialize page. load all users info
        this.LoadUsers();
        this.PopulatePerms();
    },

    PopulatePerms: function(){
        navigation.get(window.apiRoute + "/getAllPermissions/", function (err, resp) {
            if(err){
                var msg = "Error: LoadUsers: Connection error.";
                $("#response").text(msg);
                return msg;
            }
            else {
                var perms = $.parseJSON(resp);

                for (var i = 0; i < perms.length; i++) {
                    var obj = perms[i];
                    var optionname = obj.PermsID;
                    var option = new Option(obj.Perms, obj.PermsID);
                    $("#sltPermission").append($(option));

                }
            }
        })
    },

    LoadUsers: function() {
        LoadUsers("default");
    },

    LoadUsers: function(filterType){
        var route;
        switch (filterType) {
            case "First Name":
                route = "getAllUsersFilterFirstName";
                break;
            case "Last Name":
                route = "getAllUsersFilterLastName";
                break;
            default:
                route = "getAllUsers";
                break;
        }

        navigation.get(window.apiRoute + "/" + route + "/", function (err, resp) {
            if(err){
                var msg = "Error: LoadUsers: Connection error.";
                $("#response").text(msg);
                return msg;
            }
            else {
                var users = $.parseJSON(resp);

                //hold on to first div
                //clear DisplayUsersDiv
                var rowToCopy = $('.InputChild').first();
                var newRow = rowToCopy.clone();
                var rowsContainer = '#DisplayUsersDiv';
                $("#DisplayUsersDiv").empty();
                newRow.appendTo(rowsContainer);

                function permsName(perms) {
                    switch (perms) {
                        case 0:
                            return 'Customer';
                        case 1:
                            return 'Account Manager';
                        case 2:
                            return 'Employee';
                        case 3:
                            return 'Admin';
                        default:
                            return "Level: " + perms;
                    }
                }

                //populate users
                for (var i = 0; i < users.length; i++) {
                    var obj = users[i];
                    var tempRow = newRow.clone();
                    $($(tempRow).children()[0]).text(obj.Username);
                    $($(tempRow).children()[1]).text(obj.FirstName);
                    $($(tempRow).children()[2]).text(obj.LastName);
                    $($(tempRow).children()[3]).text(obj.Email);
                    $($(tempRow).children()[4]).text(permsName(obj.Perms));
                    $(tempRow).show();
                    tempRow.appendTo(rowsContainer);
                }
            }
        })
    },

    EditUser: function(editDiv){
        var usernameForEdit= $(editDiv).parent().children()[0].innerHTML;
        navigation.go("EditUser.html",{editUser:usernameForEdit});
    },

    CreateUser: function(){
        $("#divNewUser").show();
    },

    SubmitNewUser: function(){

        var uname = $('#iptUsername').val();
        var fname = $('#iptFirstName').val();
        var lname = $('#iptLastName').val();
        var email = $('#iptEmail').val();
        var perm = $('#sltPermission').text();
        var permID = $('#sltPermission').val();

        if(uname=="")
        {
            alert("username is a required field.");
            return;
        }
        if(fname=="")
        {
            alert("First name is a required field.");
            return;
        }
        if(lname=="")
        {
            alert("Last name is a required field.");
            return;
        }
        if(email=="")
        {
            alert("Email is a required field.");
            return;
        }
        if(perm=="")
        {
            alert("Permission is a required field.");
            //return;
        }

        var toPass = {
            "username":uname,
            "password":"0000",
            "email":email,
            "firstName":fname,
            "lastName":lname,
            "permID":permID
        };

       // var createUserArgs = JSON.stringify(toPass);
        //alert(createUserArgs);
        navigation.post(window.apiRoute+'/Login/createUser/', toPass, function(err, res){
                if(err) {
                    window.alert("Error: "+error);
                    this.LoadUsers();
                }
                else{
                    window.alert("User "+uname+" is created. Email confirmation is required to complete registration.");
                    this.LoadUsers();//re-load all users
                    $('#iptUsername').val('');
                    $('#iptFirstName').val('');
                    $('#iptLastName').val('');
                    $('#iptEmail').val('');
                    $('select#sltPermission option').removeAttr("selected");
                    $("#divNewUser").hide();
                }
        });

    }

};


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Salsola dendroides subsp. trichantha Pall.

### Remarks
null


text:
//
//  RLPhotoComposerDelegate.h
//  ROKOStickers
//
//  Created by Katerina Vinogradnaya on 22.04.14.
//  Copyright (c) 2014 ROKOLabs. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@class RLStickerInfo;
@class RLPhotoComposerController;
@class ROKOComponentScheme;

@protocol RLPhotoComposerDelegate <NSObject>
@optional

- (void)composer:(RLPhotoComposerController *)composer didFinishWithPhoto:(UIImage *)photo;

- (void)composerDidCancel:(RLPhotoComposerController *)composer;

/**
 *  Called on viewWillAppear for Composer view controller. Can be used, for example, to customize UI
 *
 *  @param composer composer object to be shown
 *  @param animated YES if the composer will appear with animation
 */
- (void)composer:(RLPhotoComposerController *)composer willAppearAnimated:(BOOL)animated;

/**
 *  Called on viewWillAppear for Share view controller. Can be used, for example, to customize UI
 *
 *  @param controller   Controller to be customized
 *  @param animated		YES if the composer will appear with animation
 */
- (void)shareController:(RLPhotoComposerController *)controller willAppearAnimated:(BOOL)animated;

/**
 *  Calls when user pressed shared button
 *
 *  @param composer Composer object
 *  @param image    Images to be shared
 */
- (void)composer:(RLPhotoComposerController *)composer didPressShareButtonForImage:(UIImage *)image;

/**
 *  Informs delegate about adding a new sticker on composer screen
 *
 *  @param composer    Composer object
 *  @param stickerInfo Sticker that has been added
 */
- (void)composer:(RLPhotoComposerController *)composer didAddSticker:(RLStickerInfo *)stickerInfo;

/**
 *  Informs delegate about switching to StickersPack with index
 *
 *  @param composer Composer object
 *  @param packIndex    Index of StickerPack
 */
- (void)composer:(RLPhotoComposerController *)composer didSwitchToStickerPackAtIndex:(NSInteger)packIndex;

/**
 *  Informs delegate that sticker has been removed from composer screen
 *
 *  @param composer    Composer object
 *  @param stickerInfo Sticker that has been removed
 */
- (void)composer:(RLPhotoComposerController *)composer didRemoveSticker:(RLStickerInfo *)stickerInfo;

/**
 *  Calls by composer right before appling UI scheme. Delegate may change it. In this case scheme will be applied with these changes.
 *
 *  @param composer Customizing composer
 *  @param scheme   Scheme to be used
 */
- (void)composer:(RLPhotoComposerController *)composer willApplyUIScheme:(ROKOComponentScheme *)scheme;

/**
 *  Calls by composer to save image
 *
 *  @param composer Customizing composer
 *  @image Image to save
 *  @param albumName Name of album to save the image
 */
- (void)composer:(RLPhotoComposerController *)composer shoudlSaveImage:(UIImage *)image toAlbumWithName:(NSString *)albumName;

@end


text:
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CStockOLEDBDoc

IMPLEMENT_DYNCREATE(CStockOLEDBDoc, CDocument)

BEGIN_MESSAGE_MAP(CStockOLEDBDoc, CDocument)
	//{{AFX_MSG_MAP(CStockOLEDBDoc)
		// HINWEIS - Hier werden Mapping-Makros vom Klassen-Assistenten eingefügt und entfernt.
		//    Innerhalb dieser generierten Quelltextabschnitte NICHTS VERÄNDERN!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CStockOLEDBDoc Konstruktion/Destruktion

CStockOLEDBDoc::CStockOLEDBDoc()
{
	// ZU ERLEDIGEN: Hier Code für One-Time-Konstruktion einfügen

}

CStockOLEDBDoc::~CStockOLEDBDoc()
{
}

BOOL CStockOLEDBDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// ZU ERLEDIGEN: Hier Code zur Reinitialisierung einfügen
	// (SDI-Dokumente verwenden dieses Dokument)

	return TRUE;
}

/////////////////////////////////////////////////////////////////////////////
// CStockOLEDBDoc Diagnose

#ifdef _DEBUG
void CStockOLEDBDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CStockOLEDBDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CStockOLEDBDoc Befehle


text:
> This project is the creation of a command shell called rshell.
> Main functions of the shell are to print a command prompt (e.g. $),
> read in a command in one line, and execute each command.

**Commands will take the form:**

	cmd       = executable [argumentList] [connector cmd]
	connector = || or && or ;

> The program is able to take in a limitless number of commands as
> long as they are chained together.

**Example:**

	$ ls -a

###### OR

	$ ls -a; echo hello; mkdir test

###### OR

	$ ls -a; echo hello && mkdir test || echo world; git status

#### Additional commands/functionality:

**Test:**

> Used to check if a file/directory exists from the current folder.
> To check if other files/directories exists, it is best to use the cd
> command to navigate to the parent folder before testing for the desired
> file/directory. The *test* command is useful for writing conditions
> that can be combined with && or || to write more complex bash command structures.
> Test can be executed with 2 methods, however the first of each is the preferred
> method.

	$ test -e /test/file/path      OR      $ Test -e /test/file/path

###### OR

	$ [ -e /test/file/path ]      OR      $ [-e /test/file/path]

> Currently, it will only work for the following flags:

	-e : checks if the file/directory exists
	-f : checks if the file/directory exists and is a regular file
	-d : checks if the file/directory exists and is a directory

> If a flag is not specified then -e will be used by default.
> If there is no file/directory with a flag then test will automatically be true.

**Output**

> Test will output a boolean status to the terminal as it is evaluated.

**Example:**

	test -e /test/file/path evaluates to True

###### output: (True)

	test -e /test/file/path evaluates to False

###### output: (False)

**Precedence Operators:**

> Takes the form of **( )** and are used to change the precedence of the returns of commands, connectors, and chains of connectors.

**Example:**

	$ echo A && echo B || echo C && echo D

###### output: A B D

	$ (echo A && echo B) || (echo C && echo D)

###### output: A B

> Note: This version of rshell does not support nested *( )*

**Basic Program Execution:**

- Execution of the command(s) will use the syscalls *fork*, *execvp*, and *waitpid*.
- A special built-in command of *exit* will exit the rshell.
- Anything after a *#* will be ignored.
- The *;* is used to break up commands.
- Anything within the *( )* will execute first.
- For now, *test* only has 3 flags so any flag other than -e, -f, or -d will produce an error.
- Execution of **test** uses the *stat( )* function as well as the *S_ISDIR* and *S_ISREG* macros in order to implement the flags for the program.
- The code will output nothing if nothing is entered.

# Running the program:

	$ git clone https://github.com/genjen123/rshell.git
	$ cd rshell
	$ git checkout hw2
	$ make
	$ bin/rshell

# Known bugs:

> Below is a table of known bugs that we have recorded during our testings.
> Note that this table does not reflect all possible errors available in the
> code. These bugs are based on test cases we have thought of at the moment.
> The current amount of bugs may or may not be the complete amount. However,
> that does not mean that the code will function any less than the quality
> desired.

Bug | Description
--------------- | ---------------
Echo output | Needs at least 2 spaces between echo and the string in order for the first character to be outputted (vary on systems)
ls | ls will work as a command however, ls -a may or may not work (vary on systems)
cd | Doing cd .. will produce an error the first time but will work everytime after it.
[ ] | Works best if there is a space between the arguments and brackets.

**Notes:**

- Any program that's bash specific may not work for the shell. However, standard cd commands can.
- Some recorded bugs (like ls and echo) are only bugs found when running on our personal work environment. So if the program is normally run on hammer then they are perfectly functional.
- Any commands taken in input from ~ will not run properly. If it needs to be implemented then it could be substituted for the user's homepath.
- Unlike an actual terminal, if there is no ')' for every '(', then the rshell will output an error message.


text:
#ifndef BeaconFilterChain_hpp
#define BeaconFilterChain_hpp

#include "BeaconFilter.hpp"

namespace loc{

    class BeaconFilterChain : public BeaconFilter{
    private:
        std::vector<std::shared_ptr<BeaconFilter>> filters;

    public:
        BeaconFilterChain() = default;
        ~BeaconFilterChain() = default;

        BeaconFilterChain& nFilters(int nFilters);
        std::shared_ptr<BeaconFilter> at(int i) const;
        BeaconFilterChain& addFilter(std::shared_ptr<BeaconFilter> filter);
        Beacons filter(const Beacons& beacons) const;
    };
}

#endif /* BeaconFilterChain_hpp */


text:
module Admin::FeedbackHelper
  def comment_class(state)
    return 'label-info' if state.to_s.downcase == 'presumed_ham'
    return 'label-warning' if state.to_s.downcase == 'presumed_spam'
    return 'label-success' if state.to_s.downcase == 'ham'
    'label-danger'
  end

  def show_feedback_actions(item, context = 'listing')
    return if current_user.profile.label == 'contributor'
    content_tag(:div,  class: 'action', style: '') do
      [content_tag(:small, change_status(item, context)),
       button_to_edit_comment(item),
       button_to_delete_comment(item),
       button_to_conversation(item)
      ].join(' ').html_safe
    end
  end

  def button_to_edit_comment(item)
    link_to(content_tag(:span, '', class: 'glyphicon glyphicon-pencil'), { controller: 'admin/feedback', action: 'edit', id: item.id }, { class: 'btn btn-primary btn-xs btn-action' })
  end

  def button_to_delete_comment(item)
    link_to(content_tag(:span, '', class: 'glyphicon glyphicon-trash'), { controller: 'admin/feedback', action: 'destroy', id: item.id }, { class: 'btn btn-danger btn-xs btn-action' })
  end

  def button_to_conversation(item)
    link_to(content_tag(:span, '', class: 'glyphicon glyphicon-share-alt'), { controller: 'admin/feedback', action: 'article', id: item.article_id }, { class: 'btn btn-default btn-xs btn-action' })
  end

  def change_status(item, context = 'listing')
    status = (item.state.to_s.downcase =~ /spam/) ? :ham : :spam
    klass = (item.state.to_s.downcase =~ /spam/) ? 'up' : 'down'
    klass2 = (item.state.to_s.downcase =~ /spam/) ? 'success' : 'warning'

    link_to(content_tag(:span, '', class: "glyphicon glyphicon-thumbs-#{klass}"), { controller: 'admin/feedback', action: 'change_state', id: item.id, context: context }, { class: "btn btn-#{klass2} btn-xs btn-action", remote: true })
  end
end


text:
package holiday;

import summary.PreferencePlan;

public class FlyWithQantasPlan extends PreferencePlan {

}