text:
package org.apache.camel.component.huaweicloud.dms;

import java.util.List;

import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.http.HttpConfig;
import org.apache.camel.Category;
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.component.huaweicloud.common.models.ServiceKeys;
import org.apache.camel.component.huaweicloud.dms.models.DmsRegion;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriPath;
import org.apache.camel.support.DefaultEndpoint;
import org.apache.camel.util.ObjectHelper;

/**
 * To integrate with a fully managed, high-performance message queuing service on Huawei Cloud
 */
@UriEndpoint(firstVersion = "3.12.0", scheme = "hwcloud-dms", title = "Huawei Distributed Message Service (DMS)",
             syntax = "hwcloud-dms:operation",
             category = { Category.CLOUD }, producerOnly = true)
public class DMSEndpoint extends DefaultEndpoint {

    @UriPath(description = "Operation to be performed", displayName = "Operation", label = "producer")
    @Metadata(required = true)
    private String operation;

    @UriParam(description = "DMS service region", displayName = "Service region")
    @Metadata(required = true)
    private String region;

    @UriParam(description = "DMS url. Carries higher precedence than region parameter based client initialization",
              displayName = "Service endpoint", secret = false)
    @Metadata(required = false)
    private String endpoint;

    @UriParam(description = "Cloud project ID", displayName = "Project ID")
    @Metadata(required = true)
    private String projectId;

    @UriParam(description = "Proxy server ip/hostname", displayName = "Proxy server host")
    @Metadata(required = false)
    private String proxyHost;

    @UriParam(description = "Proxy server port", displayName = "Proxy server port")
    @Metadata(required = false)
    private int proxyPort;

    @UriParam(description = "Proxy authentication user", displayName = "Proxy user", secret = true)
    @Metadata(required = false)
    private String proxyUser;

    @UriParam(description = "Proxy authentication password", displayName = "Proxy password", secret = true)
    @Metadata(required = false)
    private String proxyPassword;

    @UriParam(description = "Ignore SSL verification", displayName = "SSL Verification Ignored", defaultValue = "false")
    @Metadata(required = false)
    private boolean ignoreSslVerification;

    @UriParam(description = "Configuration object for cloud service authentication", displayName = "Service Configuration",
              secret = true)
    @Metadata(required = false)
    private ServiceKeys serviceKeys;

    @UriParam(description = "Access key for the cloud user", displayName = "API access key (AK)", secret = true)
    @Metadata(required = true)
    private String accessKey;

    @UriParam(description = "Secret key for the cloud user", displayName = "API secret key (SK)", secret = true)
    @Metadata(required = true)
    private String secretKey;

    @UriParam(description = "The message engine. Either kafka or rabbitmq. If the parameter is not specified, all instances will be queried",
              displayName = "Engine type",
              enums = "kafka,rabbitmq")
    @Metadata(required = false)
    private String engine;

    @UriParam(description = "The id of the instance. This option is mandatory when deleting or querying an instance",
              displayName = "Instance id")
    @Metadata(required = false)
    private String instanceId;

    @UriParam(description = "The name of the instance for creating and updating an instance. This option is mandatory when creating an instance",
              displayName = "Name")
    @Metadata(required = false)
    private String name;

    @UriParam(description = "The version of the message engine. This option is mandatory when creating an instance.",
              displayName = "Engine version")
    @Metadata(required = false)
    private String engineVersion;

    @UriParam(description = "The baseline bandwidth of a Kafka instance. This option is mandatory when creating a Kafka instance.",
              displayName = "Engine version")
    @Metadata(required = false)
    private String specification;

    @UriParam(description = "The message storage space. This option is mandatory when creating an instance.",
              displayName = "Storage space")
    @Metadata(required = false)
    private int storageSpace;

    @UriParam(description = "The maximum number of partitions in a Kafka instance. This option is mandatory when creating a Kafka instance.",
              displayName = "Partition Number")
    @Metadata(required = false)
    private int partitionNum;

    @UriParam(description = "The username of a RabbitMQ instance. This option is mandatory when creating a RabbitMQ instance.",
              displayName = "Access user")
    @Metadata(required = false)
    private String accessUser;

    @UriParam(description = "The password of a RabbitMQ instance. This option is mandatory when creating a RabbitMQ instance.",
              displayName = "Password")
    @Metadata(required = false)
    private String password;

    @UriParam(description = "The VPC ID. This option is mandatory when creating an instance.", displayName = "VPC ID")
    @Metadata(required = false)
    private String vpcId;

    @UriParam(description = "The security group which the instance belongs to. This option is mandatory when creating an instance.",
              displayName = "Security group ID")
    @Metadata(required = false)
    private String securityGroupId;

    @UriParam(description = "The subnet ID. This option is mandatory when creating an instance.", displayName = "Subnet ID")
    @Metadata(required = false)
    private String subnetId;

    @UriParam(description = "The ID of an available zone. This option is mandatory when creating an instance and it cannot be an empty array.",
              displayName = "Available zones")
    @Metadata(required = false)
    private List<String> availableZones;

    @UriParam(description = "The product ID. This option is mandatory when creating an instance.", displayName = "Product ID")
    @Metadata(required = false)
    private String productId;

    @UriParam(description = "The username for logging in to the Kafka Manager. This option is mandatory when creating a Kafka instance.",
              displayName = "Kafka manager username")
    @Metadata(required = false)
    private String kafkaManagerUser;

    @UriParam(description = "The password for logging in to the Kafka Manager. This option is mandatory when creating a Kafka instance.",
              displayName = "Kafka manager password")
    @Metadata(required = false)
    private String kafkaManagerPassword;

    @UriParam(description = "The storage I/O specification. This option is mandatory when creating an instance.",
              displayName = "Storage specification code")
    @Metadata(required = false)
    private String storageSpecCode;

    private DmsClient dmsClient;

    public DMSEndpoint() {
    }

    public DMSEndpoint(String uri, String operation, DMSComponent component) {
        super(uri, component);
        this.operation = operation;
    }

    public Producer createProducer() throws Exception {
        return new DMSProducer(this);
    }

    public Consumer createConsumer(Processor processor) throws Exception {
        throw new UnsupportedOperationException("You cannot receive messages from this endpoint");
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProxyHost() {
        return proxyHost;
    }

    public void setProxyHost(String proxyHost) {
        this.proxyHost = proxyHost;
    }

    public int getProxyPort() {
        return proxyPort;
    }

    public void setProxyPort(int proxyPort) {
        this.proxyPort = proxyPort;
    }

    public String getProxyUser() {
        return proxyUser;
    }

    public void setProxyUser(String proxyUser) {
        this.proxyUser = proxyUser;
    }

    public String getProxyPassword() {
        return proxyPassword;
    }

    public void setProxyPassword(String proxyPassword) {
        this.proxyPassword = proxyPassword;
    }

    public boolean isIgnoreSslVerification() {
        return ignoreSslVerification;
    }

    public void setIgnoreSslVerification(boolean ignoreSslVerification) {
        this.ignoreSslVerification = ignoreSslVerification;
    }

    public ServiceKeys getServiceKeys() {
        return serviceKeys;
    }

    public void setServiceKeys(ServiceKeys serviceKeys) {
        this.serviceKeys = serviceKeys;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getEngine() {
        return engine;
    }

    public void setEngine(String engine) {
        this.engine = engine;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public void setInstanceId(String instanceId) {
        this.instanceId = instanceId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEngineVersion() {
        return engineVersion;
    }

    public void setEngineVersion(String engineVersion) {
        this.engineVersion = engineVersion;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public int getStorageSpace() {
        return storageSpace;
    }

    public void setStorageSpace(int storageSpace) {
        this.storageSpace = storageSpace;
    }

    public int getPartitionNum() {
        return partitionNum;
    }

    public void setPartitionNum(int partitionNum) {
        this.partitionNum = partitionNum;
    }

    public String getAccessUser() {
        return accessUser;
    }

    public void setAccessUser(String accessUser) {
        this.accessUser = accessUser;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getVpcId() {
        return vpcId;
    }

    public void setVpcId(String vpcId) {
        this.vpcId = vpcId;
    }

    public String getSecurityGroupId() {
        return securityGroupId;
    }

    public void setSecurityGroupId(String securityGroupId) {
        this.securityGroupId = securityGroupId;
    }

    public String getSubnetId() {
        return subnetId;
    }

    public void setSubnetId(String subnetId) {
        this.subnetId = subnetId;
    }

    public List<String> getAvailableZones() {
        return availableZones;
    }

    public void setAvailableZones(List<String> availableZones) {
        this.availableZones = availableZones;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getKafkaManagerUser() {
        return kafkaManagerUser;
    }

    public void setKafkaManagerUser(String kafkaManagerUser) {
        this.kafkaManagerUser = kafkaManagerUser;
    }

    public String getKafkaManagerPassword() {
        return kafkaManagerPassword;
    }

    public void setKafkaManagerPassword(String kafkaManagerPassword) {
        this.kafkaManagerPassword = kafkaManagerPassword;
    }

    public String getStorageSpecCode() {
        return storageSpecCode;
    }

    public void setStorageSpecCode(String storageSpecCode) {
        this.storageSpecCode = storageSpecCode;
    }

    public DmsClient getDmsClient() {
        return dmsClient;
    }

    public void setDmsClient(DmsClient dmsClient) {
        this.dmsClient = dmsClient;
    }

    public DmsClient initClient() {
        if (dmsClient != null) {
            return dmsClient;
        }

        // check for mandatory AK/SK in ServiceKeys object or in endpoint
        if (ObjectHelper.isEmpty(getServiceKeys()) && ObjectHelper.isEmpty(getAccessKey())) {
            throw new IllegalArgumentException("Authentication parameter 'access key (AK)' not found");
        }
        if (ObjectHelper.isEmpty(getServiceKeys()) && ObjectHelper.isEmpty(getSecretKey())) {
            throw new IllegalArgumentException("Authentication parameter 'secret key (SK)' not found");
        }

        // setup AK/SK credential information. AK/SK provided through ServiceKeys overrides the AK/SK passed through the endpoint
        BasicCredentials auth = new BasicCredentials()
                .withAk(getServiceKeys() != null
                        ? getServiceKeys().getAccessKey()
                        : getAccessKey())
                .withSk(getServiceKeys() != null
                        ? getServiceKeys().getSecretKey()
                        : getSecretKey())
                .withProjectId(getProjectId());

        // setup http information (including proxy information if provided)
        HttpConfig httpConfig = HttpConfig.getDefaultHttpConfig();
        httpConfig.withIgnoreSSLVerification(isIgnoreSslVerification());
        if (ObjectHelper.isNotEmpty(getProxyHost())
                && ObjectHelper.isNotEmpty(getProxyPort())) {
            httpConfig.withProxyHost(getProxyHost())
                    .withProxyPort(getProxyPort());

            if (ObjectHelper.isNotEmpty(getProxyUser())) {
                httpConfig.withProxyUsername(getProxyUser());
                if (ObjectHelper.isNotEmpty(getProxyPassword())) {
                    httpConfig.withProxyPassword(getProxyPassword());
                }
            }
        }

        // Build DmsClient with mandatory region parameter.
        if (ObjectHelper.isNotEmpty(getEndpoint())) {
            return DmsClient.newBuilder()
                    .withCredential(auth)
                    .withHttpConfig(httpConfig)
                    .withEndpoint(getEndpoint())
                    .build();
        } else {
            return DmsClient.newBuilder()
                    .withCredential(auth)
                    .withHttpConfig(httpConfig)
                    .withRegion(DmsRegion.valueOf(getRegion()))
                    .build();
        }
    }
}


text:
package com.github.lucene.store.database.datasource;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import javax.sql.DataSource;

import com.github.lucene.store.database.DatabaseDirectoryException;

public class DataSourceUtils {

    private DataSourceUtils() {
    }

    /**
     * Returns true if the connection was created by the {@link TransactionAwareDataSourceProxy} and it
     * controls the connection (i.e. it is the most outer connection created).
     *
     * @param connection
     * @return
     */
    private static boolean isControlConnection(final Connection connection) {
        return connection instanceof ConnectionProxy && ((ConnectionProxy) connection).isControlConnection();
    }

    /**
     * Returns a jdbc connection, and in case of failure, wraps the sql exception with a Jdbc device exception.
     *
     * @param dataSource
     * @return
     * @throws DatabaseDirectoryException
     */
    public static Connection getConnection(final DataSource dataSource) throws DatabaseDirectoryException {
        try {
            return dataSource.getConnection();
        } catch (final SQLException e) {
            throw new DatabaseDirectoryException("Failed to open jdbc connection", e);
        }
    }

    /**
     * Close the given JDBC connection and ignore any thrown exception. This is useful for typical finally blocks in
     * manual JDBC code.
     *

     * Will only close the connection under two conditions: If the connection was not created by the
     * {@link TransactionAwareDataSourceProxy}, or if it was created by {@link TransactionAwareDataSourceProxy}, and the
     * connection controls the connection (i.e. it is the most outer connection created).
     *
     * @param connection
     * @throws DatabaseDirectoryException
     */
    public static void releaseConnection(final Connection connection) throws DatabaseDirectoryException {
        if (connection == null) {
            return;
        }
        if (!(connection instanceof ConnectionProxy) || isControlConnection(connection)) {
            try {
                connection.close();
            } catch (final SQLException e) {
                throw new DatabaseDirectoryException("Failed to release jdbc connection", e);
            }
        }
    }

    /**
     * Commits the connection only if the connection is controlled by us. The connection is controlled if it is the
     * TransactionAwareDataSourceProxy and it is the most outer connection in the tree of connections the
     * TransactionAwareDataSourceProxy returned.
     *
     * @param connection
     * @throws DatabaseDirectoryException
     */
    public static void commitConnection(final Connection connection) throws DatabaseDirectoryException {
        try {
            if (connection != null && isControlConnection(connection)) {
                connection.commit();
            }
        } catch (final SQLException e) {
            rollbackConnection(connection);
            throw new DatabaseDirectoryException("Failed to commit jdbc connection", e);
        }
    }

    /**
     * Rollbacks the connection only if the connection is controlled by us. The connection is controlled if it is the
     * TransactionAwareDataSourceProxy and it is the most outer connection in the tree of connections the
     * TransactionAwareDataSourceProxy returned.
     *
     * @param connection
     */
    public static void rollbackConnection(final Connection connection) {
        try {
            if (connection != null && isControlConnection(connection)) {
                connection.rollback();
            }
        } catch (final SQLException e) {
            // do nothing
        }
    }

    /**
     * Close the given JDBC Statement and ignore any thrown exception. This is useful for typical finally blocks in
     * manual JDBC code.
     *
     * @param statement
     *            the JDBC Statement to close
     */
    public static void closeStatement(final Statement statement) {
        if (statement != null) {
            try {
                statement.close();
            } catch (final SQLException ex) {
            }
        }
    }

    /**
     * Close the given JDBC ResultSet and ignore any thrown exception. This is useful for typical finally blocks in
     * manual JDBC code.
     *
     * @param resultSet
     *            the JDBC ResultSet to close
     */
    public static void closeResultSet(final ResultSet resultSet) {
        if (resultSet != null) {
            try {
                resultSet.close();
            } catch (final SQLException ex) {
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
(function(){
    'use strict';

    $.mockjaxSettings.logging = false;

    describe('The command Api tests', function() {

        var commandApi;

        describe('When not newing up the command api', function() {

            beforeEach(function() {

                commandApi = cedarJs.CommandApi();
            });

            it('should still return an instance', function() {
                expect((commandApi instanceof cedarJs.CommandApi)).toBe(true);
            });
        });

        describe('When successfully executed', function() {

            var successHandler = jasmine.createSpy('success');
            var done = false;

            beforeEach(function() {

                commandApi = new cedarJs.CommandApi({
                    routePrefix: 'test'
                });

                $.mockjax({
                  url: "test/commands/someid",
                  type: 'PUT',
                  status: 200,
                  onAfterSuccess: function(data){
                    done = true; }
                });

                commandApi.execute({
                    commandId: 'someid',
                    version: 'v1',
                    commandName: 'somename',
                    value: 'somevalue'
                }).then(successHandler);
            });

            it('should create a valid put request', function() {
                var mockedRequest = $.mockjax.mockedAjaxCalls()[0];
                expect(mockedRequest.url).toBe('test/commands/someid');
                expect(mockedRequest.contentType).toBe('application/vnd.somename-v1+json');
                expect(mockedRequest.data.indexOf('"commandId":"someid"')).toBeGreaterThan(0);
                expect(mockedRequest.data.indexOf('"value":"somevalue"')).toBeGreaterThan(0);
                expect(mockedRequest.data.indexOf('"commandName":"somename"')).toBeGreaterThan(0);
            });

            it('should call the success handler', function() {

                waitsFor(function() { return done; }, 1000);

                runs(function() {
                    expect(successHandler).toHaveBeenCalled();
                });
            });
        });

        describe('When unsuccessfully executed', function() {

            var errorHandler = jasmine.createSpy('error');
            var done = false;

            beforeEach(function() {

                commandApi = new cedarJs.CommandApi();

                $.mockjax({
                  url: "commands/someid",
                  type: 'PUT',
                  status: 500,
                  onAfterError: function(data){
                    done = true; }
                });

                commandApi.execute({
                    commandId: 'someid',
                    commandName: 'somename'
                }).then(null, errorHandler);
            });

            it('should call the error handler', function() {

                waitsFor(function() { return done; }, 1000);

                runs(function() {
                    expect(errorHandler).toHaveBeenCalled();
                });
            });
        });
    });
})();


text:
    # Extracts the first three chars from the Computer's name
SHORT_NAME="$(/usr/sbin/scutil --get ComputerName | /usr/bin/cut -c1-3)"

if [[ "$SHORT_NAME" == "DUB" ]]; then
	/usr/sbin/systemsetup -settimezone Europe/Dublin

    # NYC is a catchall airport code for JFK, EWR, LGA
elif [[ "$SHORT_NAME" == "NYC" ]]; then
       /usr/sbin/systemsetup -settimezone America/New_York

    # There is no America/San_Franciso, so we have to use Los Angeles
elif [[ "$SHORT_NAME" == "SFO" ]]; then
        /usr/sbin/systemsetup -settimezone America/Los_Angeles

elif [[ "$SHORT_NAME" == "ORD" ]]; then
        /usr/sbin/systemsetup -settimezone America/Chicago

    # There is no Australia/Sydney (seriously!), so have to use Brisbane
elif [[ "$SHORT_NAME" == "SYD" ]]; then
        /usr/sbin/systemsetup -settimezone Australia/Brisbane

else
    # If all else fails, default to the GMT timezone
        /usr/sbin/systemsetup -settimezone GMT
fi


text:
#ifndef __LIS3MDL_H__
#define __LIS3MDL_H__

// Uncomment one of the following defines to enable debug output
// #define LIS3MDL_DEBUG_LEVEL_1    // only error messages
// #define LIS3MDL_DEBUG_LEVEL_2    // debug and error messages

// LIS3MDL addresses
#define LIS3MDL_I2C_ADDRESS_1           0x1c  // SDO pin is low
#define LIS3MDL_I2C_ADDRESS_2           0x1e  // SDO pin is high

// LIS3MDL chip id
#define LIS3MDL_CHIP_ID                 0x3d  // LIS3MDL_REG_WHO_AM_I<7:0>

// Definition of error codes
#define LIS3MDL_OK                      0
#define LIS3MDL_NOK                     -1

#define LIS3MDL_INT_ERROR_MASK          0x000f
#define LIS3MDL_DRV_ERROR_MASK          0xfff0

// Error codes for I2C and SPI interfaces ORed with LIS3MDL driver error codes
#define LIS3MDL_I2C_READ_FAILED         1
#define LIS3MDL_I2C_WRITE_FAILED        2
#define LIS3MDL_I2C_BUSY                3
#define LIS3MDL_SPI_WRITE_FAILED        4
#define LIS3MDL_SPI_READ_FAILED         5
#define LIS3MDL_SPI_BUFFER_OVERFLOW     6

// LIS3MDL driver error codes ORed with error codes for I2C and SPI interfaces
#define LIS3MDL_WRONG_CHIP_ID              ( 1 << 8)
#define LIS3MDL_GET_RAW_DATA_FAILED        ( 2 << 8)
#define LIS3MDL_CONFIG_INT_FAILED          ( 3 << 8)
#define LIS3MDL_INT_SOURCE_FAILED          ( 4 << 8)
#define LIS3MDL_GET_ADC_DATA_FAILED        ( 5 << 8)

#include "lis3mdl_platform.h"
#include "lis3mdl_types.h"

#ifdef __cplusplus
extern "C"
{
#endif

/**
 * @brief   Initialize the sensor
 *
 * Reset the sensor and switch to power down mode. All registers are reset to
 * default values.
 *
 * @param   bus     I2C or SPI bus at which LIS3MDL sensor is connected
 * @param   addr    I2C addr of the LIS3MDL sensor, 0 for using SPI
 * @param   cs      SPI CS GPIO, ignored for I2C
 * @return          pointer to sensor data structure, or NULL on error
 */
lis3mdl_sensor_t* lis3mdl_init_sensor (uint8_t bus, uint8_t addr, uint8_t cs);

/**
 * @brief   Set sensor operation mode (OM) and output data rate (ODR)
 *
 * @param   dev     pointer to the sensor device data structure
 * @param   mode    sensor operation mode (OM) at output data rate (ODR)
 * @return          true on success, false on error
 */
bool lis3mdl_set_mode (lis3mdl_sensor_t* dev, lis3mdl_mode_t mode);

/**
 * @brief   Set scale (full scale range)
 *
 * @param   dev     pointer to the sensor device data structure
 * @param   scale   full range scale
 * @return          true on success, false on error
 */
bool lis3mdl_set_scale (lis3mdl_sensor_t* dev, lis3mdl_scale_t scale);

/**
 * @brief   Test whether new data samples are available
 *
 * @param   dev     pointer to the sensor device data structure
 * @return          true on new data, otherwise false
 */
bool lis3mdl_new_data (lis3mdl_sensor_t* dev);

/**
 * @brief   Get one sample of sensor data as floating point values (unit Gauss)
 *
 * @param   dev     pointer to the sensor device data structure
 * @param   data    pointer to float data structure filled with g values
 * @return          true on success, false on error
 */
bool lis3mdl_get_float_data (lis3mdl_sensor_t* dev,
                            lis3mdl_float_data_t* data);

/**
 * @brief   Get one sample of raw sensor data as 16 bit two's complements
 *
 * @param   dev     pointer to the sensor device data structure
 * @param   raw     pointer to raw data structure filled with values
 * @return          true on success, false on error
 */
bool lis3mdl_get_raw_data (lis3mdl_sensor_t* dev, lis3mdl_raw_data_t* raw);

/**
 * @brief   Set configuration for threshold interrupt signal INT
 *
 * The function enables the interrupt signal if one of the possible sources
 * is enabled for interrupts.
 *
 * @param   dev      pointer to the sensor device data structure
 * @param   config   configuration for the specified interrupt signal
 * @return           true on success, false on error
 */
bool lis3mdl_set_int_config (lis3mdl_sensor_t* dev,
                             lis3mdl_int_config_t* config);

/**
 * @brief   Get configuration for threshold interrupt signal INT
 *
 * @param   dev      pointer to the sensor device data structure
 * @param   config   configuration for the specified interrupt signal
 * @return           true on success, false on error
 */
bool lis3mdl_get_int_config (lis3mdl_sensor_t* dev,
                             lis3mdl_int_config_t* config);

/**
 * @brief   Get the source of the threshold interrupt signal INT
 *
 * Returns a byte with flags that indicate the value(s) that triggered
 * the interrupt signal (see INT_SRC register in datasheet for details)
 *
 * @param   dev      pointer to the sensor device data structure
 * @param   source   pointer to the interrupt source
 * @return           true on success, false on error
 */
bool lis3mdl_get_int_source (lis3mdl_sensor_t* dev,
                             lis3mdl_int_source_t* source);

/**
 * @brief   Enable/Disable temperature sensor
 *
 * @param   dev      pointer to the sensor device data structure
 * @param   enable   if true, temperature sensor is enabled
 * @return           true on success, false on error
 */
bool lis3mdl_enable_temperature (lis3mdl_sensor_t* dev, bool enable);

/**
 * @brief   Get temperature
 *
 * @param   dev      pointer to the sensor device data structure
 * @return           temperature in degree
 */
float lis3mdl_get_temperature (lis3mdl_sensor_t* dev);

// ---- Low level interface functions -----------------------------

/**
 * @brief   Direct write to register
 *
 * PLEASE NOTE: This function should only be used to do something special that
 * is not covered by the high level interface AND if you exactly know what you
 * do and what effects it might have. Please be aware that it might affect the
 * high level interface.
 *
 * @param   dev      pointer to the sensor device data structure
 * @param   reg      address of the first register to be changed
 * @param   data     pointer to the data to be written to the register
 * @param   len      number of bytes to be written to the register
 * @return           true on success, false on error
 */
bool lis3mdl_reg_write (lis3mdl_sensor_t* dev,
                        uint8_t reg, uint8_t *data, uint16_t len);

/**
 * @brief   Direct read from register
 *
 * PLEASE NOTE: This function should only be used to do something special that
 * is not covered by the high level interface AND if you exactly know what you
 * do and what effects it might have. Please be aware that it might affect the
 * high level interface.
 *
 * @param   dev      pointer to the sensor device data structure
 * @param   reg      address of the first register to be read
 * @param   data     pointer to the data to be read from the register
 * @param   len      number of bytes to be read from the register
 * @return           true on success, false on error
 */
bool lis3mdl_reg_read (lis3mdl_sensor_t* dev,
                       uint8_t reg, uint8_t *data, uint16_t len);

#ifdef __cplusplus
}
#endif /* End of CPP guard */

#endif /* __LIS3MDL_H__ */


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

namespace ApiClients\Client\AppVeyor\CommandBus\Handler\Project;

use ApiClients\Client\AppVeyor\CommandBus\Command\Project\LatestBuildCommand;
use ApiClients\Client\AppVeyor\Resource\BuildInterface;
use ApiClients\Tools\Services\Client\FetchAndHydrateService;
use ApiClients\Tools\Services\Client\FetchAndIterateService;
use React\Promise\PromiseInterface;

final class LatestBuildHandler
{
    /**
     * @var FetchAndHydrateService
     */
    private $service;

    /**
     * @param FetchAndIterateService $service
     */
    public function __construct(FetchAndHydrateService $service)
    {
        $this->service = $service;
    }

    /**
     * @param  LatestBuildCommand $command
     * @return PromiseInterface
     */
    public function handle(LatestBuildCommand $command): PromiseInterface
    {
        return $this->service->fetch(
            'projects/' . $command->getAccountName() . '/' . $command->getProjectSlug(),
            'build',
            BuildInterface::HYDRATE_CLASS
        );
    }
}


text:
@implementation DDFileAndLineNumberFormatter

- (NSString *)formatLogMessage:(DDLogMessage *)logMessage
{
    NSString *path = [NSString stringWithCString:logMessage->file encoding:NSASCIIStringEncoding];
    NSString *fileName = [path lastPathComponent];
    return [NSString stringWithFormat:@"%@:%d %@", fileName, logMessage->lineNumber, logMessage->logMsg];
}
@end


text:
import re
import sublime
from sublime_plugin import WindowCommand

from ..git_command import GitCommand
from ...common import util
from .log import LogMixin

SHOW_COMMIT_TITLE = "COMMIT: {}:{}"

class GsShowFileAtCommitCommand(WindowCommand, GitCommand):

    def run(self, commit_hash, filepath, lineno=1, lang=None):
        sublime.set_timeout_async(
            lambda: self.run_async(
                commit_hash=commit_hash,
                filepath=filepath,
                lineno=lineno,
                lang=lang))

    def run_async(self, commit_hash, filepath, lineno=1, lang=None):
        # need to get repo_path before the new view is created.
        repo_path = self.repo_path
        view = util.view.get_scratch_view(self, "show_file_at_commit")
        settings = view.settings()
        settings.set("git_savvy.show_file_at_commit_view.commit", commit_hash)
        settings.set("git_savvy.file_path", filepath)
        settings.set("git_savvy.show_file_at_commit_view.lineno", lineno)
        settings.set("git_savvy.repo_path", repo_path)
        if not lang:
            lang = util.file.get_syntax_for_file(filepath)
        view.set_syntax_file(lang)
        view.set_name(SHOW_COMMIT_TITLE.format(self.get_short_hash(commit_hash), self.get_rel_path(filepath)))
        sublime.set_timeout_async(lambda: self.render_text(view), 0)

    def render_text(self, view):
        commit_hash = view.settings().get("git_savvy.show_file_at_commit_view.commit")
        content = self.get_file_content_at_commit(self.file_path, commit_hash)
        view.run_command("gs_replace_view_text", {"text": content, "nuke_cursors": True})
        lineno = view.settings().get("git_savvy.show_file_at_commit_view.lineno")
        util.view.move_cursor(view, lineno, 0)

class GsShowCurrentFileAtCommitCommand(GsShowFileAtCommitCommand):

    @util.view.single_cursor_coords
    def run(self, coords, commit_hash, lineno=None, lang=None):
        if not lang:
            lang = self.window.active_view().settings().get('syntax')
        if lineno is None:
            lineno = self.find_matching_lineno(None, commit_hash, coords[0] + 1)
        super().run(
            commit_hash=commit_hash,
            filepath=self.file_path,
            lineno=lineno,
            lang=lang)

class GsShowCurrentFileCommand(LogMixin, WindowCommand, GitCommand):
    """
    Show a panel of commits of current file on current branch and
    then open the file at the selected commit.
    """

    def run(self):
        super().run(file_path=self.file_path)

    def do_action(self, commit_hash, **kwargs):
        self.window.run_command("gs_show_current_file_at_commit", {
            "commit_hash": commit_hash
        })


text:
<?php
include_once __DIR__ . "/../config.inc.php";
?>

Login

Welcome to <?= $customizationConfig["title"] ?>. You need an account to use this password
                    manager.

                <form id="page_login_form_login" method="POST" action="action.php">
                    <input type="hidden" name="a" value="user/login" readonly style="display: none">

                            <input type="text" class="form-control" title="Username (required)" minlength="3"
                                   name="username" autocomplete="username" required/>
                            Username *

                            <input type="password" class="form-control" title="Password (required)" minlength="8"
                                   name="password" autocomplete="current-password" required/>
                            Password *

                        <input id="checkboxPersistent" type="checkbox" title="Stay logged in" name="persistent">
                        Stay logged in

Two-Factor-Authentication

                                        You have two-factor-authentication enabled! Please enter you generated 6-digit
                                        code below.

                                        You may enter your recovery code, which will disable two-factor-authentication
                                        permanently.

                                            <input type="text" class="form-control"
                                                   title="Authentication Code (required)" name="2faCode"
                                                   autocomplete="off" disabled/>
                                            Authentication Code *

                                    * Required
                                    <button type="button" class="btn btn-flat btn-danger" data-dismiss="modal">Cancel
                                    </button>
                                    <button type="submit" class="btn btn-flat btn-primary">Login</button>

                        * Required
                        <button type="submit" class="btn btn-success pull-right">Login</button>

                </form>


text:
This demo made use of paralledl dialogs which have been deprecated in 4.00

# kitchenalia_web

The server side programs of the Kitchenalia Genero Mobile demo

Includes the following programs ...

kitchenalia_db_create - Used to create a database, and populate it with demo data.

kitchenalia_web - A web front-end for simple admin purposes of this database

kitchenalia_server - Web Services used by the kitchenalia mobile application


text:
package test.junit.testsetup;

import junit.extensions.TestSetup;
import junit.framework.TestSuite;
import org.testng.internal.objects.InstanceCreator;

public class TestSuiteContainerWrapper extends TestSetup {
  private static Data INSTANCE = null;
  private static TestSuite _test = null;
  private static Class<? extends Data> dataImpl = null;

  public TestSuiteContainerWrapper(TestSuite testSuite, Class<? extends Data> dataImpl) {
    super(testSuite);
    _test = testSuite;
    TestSuiteContainerWrapper.dataImpl = dataImpl;
  }

  public static Data getData() {
    return INSTANCE;
  }

  @Override
  protected void setUp() throws Exception {
    System.out.println("setup");
    INSTANCE = InstanceCreator.newInstance(dataImpl);
  }

  @Override
  protected void tearDown() throws Exception {
    System.out.println("teardown");

    INSTANCE = null;

    System.out.println(
        _test.countTestCases()
            + " test cases defined by \""
            + _test.getName()
            + "\" were executed.");
  }
}


text:
/* You can add global styles to this file, and also import other style files */
.container-fluid{
    padding: 0;
}
body{
  background: url('./assets/img/homebg.jpg')no-repeat center center fixed;

  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

app-nav{
    /*position: absolute;*/
    width: 100%;
}

app-about{
      width: 100%;
      position: absolute;
}
app-home{
      width: 100%;
      position: absolute;
}
app-webdev{
      width: 100%;
      position: absolute;
}
app-root{
      background-image: none;
      width: 100%;
      position: absolute;
}
.up-loader {
      padding-top: 250px;
      height: 100%;
}
.loader {
    margin: 0 auto;
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 100px;
    height: 100px;
    animation: spin 2s linear infinite;

}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


text:
title: Contact
layout: page
---

Get In Touch With Me : email me


text:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmTempConverter
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.cmdEnd = New System.Windows.Forms.Button()
        Me.cmdClear = New System.Windows.Forms.Button()
        Me.cmdConvert = New System.Windows.Forms.Button()
        Me.txtInputTemp = New System.Windows.Forms.TextBox()
        Me.txtDisplayTemp = New System.Windows.Forms.Label()
        Me.lblInputTemp = New System.Windows.Forms.Label()
        Me.lblInfo = New System.Windows.Forms.Label()
        Me.lblCelciusTemp = New System.Windows.Forms.Label()
        Me.SuspendLayout()
        '
        'cmdEnd
        '
        Me.cmdEnd.BackColor = System.Drawing.Color.Red
        Me.cmdEnd.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdEnd.Font = New System.Drawing.Font("Arial", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdEnd.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdEnd.Location = New System.Drawing.Point(231, 321)
        Me.cmdEnd.Name = "cmdEnd"
        Me.cmdEnd.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdEnd.Size = New System.Drawing.Size(129, 49)
        Me.cmdEnd.TabIndex = 13
        Me.cmdEnd.Text = "END"
        Me.cmdEnd.UseVisualStyleBackColor = False
        '
        'cmdClear
        '
        Me.cmdClear.BackColor = System.Drawing.Color.Red
        Me.cmdClear.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdClear.Font = New System.Drawing.Font("Arial", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdClear.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdClear.Location = New System.Drawing.Point(26, 321)
        Me.cmdClear.Name = "cmdClear"
        Me.cmdClear.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdClear.Size = New System.Drawing.Size(145, 49)
        Me.cmdClear.TabIndex = 12
        Me.cmdClear.Text = "CLEAR"
        Me.cmdClear.UseVisualStyleBackColor = False
        '
        'cmdConvert
        '
        Me.cmdConvert.BackColor = System.Drawing.Color.Red
        Me.cmdConvert.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdConvert.Font = New System.Drawing.Font("Arial", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdConvert.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdConvert.Location = New System.Drawing.Point(61, 188)
        Me.cmdConvert.Name = "cmdConvert"
        Me.cmdConvert.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdConvert.Size = New System.Drawing.Size(249, 49)
        Me.cmdConvert.TabIndex = 11
        Me.cmdConvert.Text = "Convert"
        Me.cmdConvert.UseVisualStyleBackColor = False
        '
        'txtInputTemp
        '
        Me.txtInputTemp.AcceptsReturn = True
        Me.txtInputTemp.BackColor = System.Drawing.SystemColors.Window
        Me.txtInputTemp.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtInputTemp.Font = New System.Drawing.Font("Arial", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtInputTemp.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtInputTemp.Location = New System.Drawing.Point(243, 103)
        Me.txtInputTemp.MaxLength = 0
        Me.txtInputTemp.Name = "txtInputTemp"
        Me.txtInputTemp.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtInputTemp.Size = New System.Drawing.Size(111, 44)
        Me.txtInputTemp.TabIndex = 10
        Me.txtInputTemp.Text = " "
        Me.txtInputTemp.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'txtDisplayTemp
        '
        Me.txtDisplayTemp.BackColor = System.Drawing.SystemColors.Control
        Me.txtDisplayTemp.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.txtDisplayTemp.Cursor = System.Windows.Forms.Cursors.Default
        Me.txtDisplayTemp.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.txtDisplayTemp.Font = New System.Drawing.Font("Arial", 24.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtDisplayTemp.ForeColor = System.Drawing.SystemColors.ControlText
        Me.txtDisplayTemp.Location = New System.Drawing.Point(243, 252)
        Me.txtDisplayTemp.Name = "txtDisplayTemp"
        Me.txtDisplayTemp.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtDisplayTemp.Size = New System.Drawing.Size(111, 41)
        Me.txtDisplayTemp.TabIndex = 15
        Me.txtDisplayTemp.Text = " "
        Me.txtDisplayTemp.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblInputTemp
        '
        Me.lblInputTemp.BackColor = System.Drawing.Color.SpringGreen
        Me.lblInputTemp.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblInputTemp.Font = New System.Drawing.Font("Arial", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblInputTemp.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblInputTemp.Location = New System.Drawing.Point(29, 106)
        Me.lblInputTemp.Name = "lblInputTemp"
        Me.lblInputTemp.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblInputTemp.Size = New System.Drawing.Size(204, 41)
        Me.lblInputTemp.TabIndex = 9
        Me.lblInputTemp.Text = "Enter Temperature:"
        Me.lblInputTemp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'lblInfo
        '
        Me.lblInfo.BackColor = System.Drawing.Color.SpringGreen
        Me.lblInfo.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.lblInfo.Cursor = System.Windows.Forms.Cursors.Default
        Me.lblInfo.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.lblInfo.Font = New System.Drawing.Font("Arial", 18.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblInfo.ForeColor = System.Drawing.SystemColors.ControlText
        Me.lblInfo.Location = New System.Drawing.Point(29, 21)
        Me.lblInfo.Name = "lblInfo"
        Me.lblInfo.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.lblInfo.Size = New System.Drawing.Size(325, 77)
        Me.lblInfo.TabIndex = 8
        Me.lblInfo.Text = " "
        Me.lblInfo.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'lblCelciusTemp
        '
        Me.lblCelciusTemp.Font = New System.Drawing.Font("Arial", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblCelciusTemp.Location = New System.Drawing.Point(29, 265)
        Me.lblCelciusTemp.Name = "lblCelciusTemp"
        Me.lblCelciusTemp.Size = New System.Drawing.Size(214, 21)
        Me.lblCelciusTemp.TabIndex = 16
        Me.lblCelciusTemp.Text = "Celcius Temperature:"
        '
        'frmTempConverter
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.BackColor = System.Drawing.Color.SpringGreen
        Me.ClientSize = New System.Drawing.Size(399, 402)
        Me.Controls.Add(Me.lblCelciusTemp)
        Me.Controls.Add(Me.cmdEnd)
        Me.Controls.Add(Me.cmdClear)
        Me.Controls.Add(Me.cmdConvert)
        Me.Controls.Add(Me.txtInputTemp)
        Me.Controls.Add(Me.txtDisplayTemp)
        Me.Controls.Add(Me.lblInputTemp)
        Me.Controls.Add(Me.lblInfo)
        Me.Name = "frmTempConverter"
        Me.Text = "Temperature Converter"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Public WithEvents cmdEnd As System.Windows.Forms.Button
    Public WithEvents cmdClear As System.Windows.Forms.Button
    Public WithEvents cmdConvert As System.Windows.Forms.Button
    Public WithEvents txtInputTemp As System.Windows.Forms.TextBox
    Public WithEvents txtDisplayTemp As System.Windows.Forms.Label
    Public WithEvents lblInputTemp As System.Windows.Forms.Label
    Public WithEvents lblInfo As System.Windows.Forms.Label
    Friend WithEvents lblCelciusTemp As System.Windows.Forms.Label

End Class


text:
import { Component, OnInit, OnDestroy } from '@angular/core';
import { SpotifyService } from '../../shared/services/spotify.service';
import { Album } from '../../shared/models/Album';
import { ActivatedRoute } from '@angular/router';
import { TruncatePipe } from '../../shared/pipes/truncate.pipe';

declare var ENV: string;

@Component({
    selector: 'as-album',
    pipes: [TruncatePipe],
    templateUrl: 'app/components/album/album.html',
    styleUrls: ['app/components/album/album.css']
})
export class AlbumComponent implements OnInit, OnDestroy {
  /**
   *
   *
   * @type {string}
   */
  id: string;

  /**
   *
   *
   * @type {Album[]}
   */
  album: Album[];

  /**
   *
   *
   * @type {string}
   */
  public errorMessage: string;

  /**
   *
   *
   * @type {*}
   */
  sub: any;

  /**
   * Creates an instance of AlbumComponent.
   *
   * @param {SpotifyService} _spotifyService
   * @param {ActivatedRoute} _route
   */
  constructor(
    private _spotifyService: SpotifyService,
    private _route: ActivatedRoute
  ) {}

  /**
   * initialize.
   */
  ngOnInit() {
    if (ENV !== 'production') {
      console.log('Album component initialized.');
    }

    // Get the artist information from the Spotify Service.
    this.sub = this._route.params
      .map(params => params['id'])
      .subscribe((id: any) => {
      this._spotifyService.getAlbum(id)
        .subscribe(
          album => {
            this.album = album;
        },
        error => { this.errorMessage = <any>error; console.error(this.errorMessage); }
      );
    });
  }

  /**
   * Clean up.
   */
  ngOnDestroy() {
    this.sub.unsubscribe();
  }

  /**
   * Convert ms to ms.
   *
   * @param {number} millis
   * @returns
   */
  millisToMinutesAndSeconds(millis: number) {
    let minutes: number = Math.floor(millis / 60000);
    let seconds: any = ((millis % 60000) / 1000).toFixed(0);

    return minutes + ':' + (seconds < 10 ? '0' : '') + seconds;
  }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GDIDrawer;
using System.Drawing;

namespace CMPE2300BrandonFooteICA3
{
    public class Ball
    {
        public static Random _newRandom = new Random();
        public static CDrawer _Canvas = null;
        private static int _Radius;
        public static int Radius
        {
            set
            {
                _Radius = Math.Abs(value);
            }
        }
        public Color _Color = new Color();
        public Point _Point = new Point();
        public int _xVelocity;
        public int _yVelocity;
        public int _iAlive = 3;

        static Ball()
        {
            _Canvas = new CDrawer(_newRandom.Next(599, 900), _newRandom.Next(499, 800), false);
            Radius = _newRandom.Next(9, 80);
        }

        public Ball()
        {
            _Color = GDIDrawer.RandColor.GetColor();
            _xVelocity = _newRandom.Next(-11, 10);
            _yVelocity = _newRandom.Next(-11, 10);
            _Point.X = _newRandom.Next(0, _Canvas.ScaledWidth);
            while (_Point.X - _Radius < 0 || _Point.X + _Radius > _Canvas.ScaledWidth)
            {
                _Point.X = _newRandom.Next(0, _Canvas.ScaledWidth);
            }
            _Point.Y = _newRandom.Next(0, _Canvas.ScaledHeight);
            while (_Point.Y - _Radius < 0 || _Point.Y + _Radius > _Canvas.ScaledHeight)
            {
                _Point.Y = _newRandom.Next(0, _Canvas.ScaledHeight);
            }
        }

        public void ShowBall()
        {
            _Canvas.AddCenteredEllipse(_Point.X, _Point.Y,
                _Radius, _Radius, Color.FromArgb(_iAlive, _Color));
        }

        public void MoveBall()
        {
            _iAlive--;
            if (_iAlive < 1)
            {
                _iAlive = _newRandom.Next(49, 127);
            }
            if (_Point.X - _Radius < 0 || _Point.X + _Radius > _Canvas.ScaledWidth)
            {
                _xVelocity = _xVelocity * -1;
            }
            if (_Point.Y - _Radius < 0 || _Point.Y + _Radius > _Canvas.ScaledHeight)
            {
                _yVelocity = _yVelocity * -1;
            }
        }
        public static bool _Loading
        {
            set
            {
                if (value == false)
                {
                    _Canvas.Render();
                }
                if (value == true)
                {
                    _Canvas.Clear();
                }
            }
        }
    }
}


text:
def assertRaisesMessage(exception_class, lambda_function, message_substring):
    try:
        lambda_function()
    except exception_class as ex:
        msg = ex.args[0]
        if message_substring not in msg:
            raise BaseException("Unexpected exception string '%s'" % msg)

def assert_type(obj, expected_type, allowNone=False):
    assert (allowNone and obj is None) or isinstance(obj, expected_type), "Unexpected type %s" % str(type(obj))

def enum_values(enum_class):
    return enum_class._member_map_

def enum_values_as_string(enum_class):
    return ','.join([x for x in enum_values(enum_class)])

def enum_from_string(enum_class, string_representation):
    if string_representation in enum_class._member_map_:
        return enum_class._member_map_[string_representation]
    else:
        raise BaseException("Unable to convert '%s' to %s. Possible values are: %s" %
                            (string_representation, str(enum_class), enum_values_as_string(enum_class)))

def assert_equal(l, r):
    assert l == r, "%s != %s" % (str(l), str(r))

def coalesce(*arg):
    for el in arg:
        if el is not None:
            return el
    return None


text:
<?php

/**
 * TOP API: taobao.ump.detail.delete request
 *
 * @author auto create
 * @since  1.0, 2013-09-13 16:51:03
 */
class Taobao_Request_UmpDetailDeleteRequest {
	/**
	 * 活动详情id
	 **/
	private $detailId;

	private $apiParas = array();

	public function setDetailId($detailId) {
		$this->detailId = $detailId;
		$this->apiParas["detail_id"] = $detailId;
	}

	public function getDetailId() {
		return $this->detailId;
	}

	public function getApiMethodName() {
		return "taobao.ump.detail.delete";
	}

	public function getApiParas() {
		return $this->apiParas;
	}

	public function check() {

		Taobao_RequestCheckUtil::checkNotNull($this->detailId, "detailId");
	}

	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}


text:
const dump = require('./webpack-config-dump')

module.exports = config => {
  // argv is a custom config, so must come before delete-properties
  if (config && config.argv && config.argv.debug) {
    dump(config)
  }
}


text:
if SELinuxDistroHelper.selinux_supported?
  ssh_keygen_module = 'gitlab-7.2.0-ssh-keygen'
  execute "semodule -i /opt/gitlab/embedded/selinux/rhel/7/#{ssh_keygen_module}.pp" do
    not_if "getenforce | grep Disabled"
    not_if "semodule -l | grep '^#{ssh_keygen_module}\\s'"
  end

  authorized_keys_module = 'gitlab-10.5.0-ssh-authorized-keys'
  execute "semodule -i /opt/gitlab/embedded/selinux/rhel/7/#{authorized_keys_module}.pp" do
    not_if "getenforce | grep Disabled"
    not_if "semodule -l | grep '^#{authorized_keys_module}\\s'"
  end

  gitlab_shell_module = 'gitlab-13.5.0-gitlab-shell'
  execute "semodule -i /opt/gitlab/embedded/selinux/rhel/7/#{gitlab_shell_module}.pp" do
    not_if "getenforce | grep Disabled"
    not_if "semodule -l | grep '^#{gitlab_shell_module}\\s'"
  end
end

# If SELinux is enabled, make sure that OpenSSH thinks the .ssh directory and authorized_keys file of the
# git_user is valid.
bash "Set proper security context on ssh files for selinux" do
  code lazy { SELinuxHelper.commands(node) }
  only_if "id -Z"
  not_if { !node['gitlab']['gitlab-rails']['enable'] }
  action :nothing
end


text:
%%  Introduction to *wavelet_2d*
% *wavelet_2d* is a function able to compute the wavelet transform of a
% signal. Given $$ J \in \bf{N} $$, the wavelet transform of a signal
% $$ x \in \bf{R}^N $$
% is given by
%
% $$ Wf(x) =\{x\ast \phi_J, x\ast\psi_{\lambda}\}_{\lambda \in \mathcal{P}} $$
% where in our case $\mathcal{P}=\{\lambda=2^{-j}r,r \in G_+, j<J\}$ is the
% index of a set of filters.
%
%% Usage
% [x_phi, x_psi] = *wavelet_2d*(x, filters, options) (see
% <matlab:doc('wavelet_2d') wavelet_2d>).
%
%% Description
% It is possible to create some wavelet filters with wavelet_factory_2d for
% instance. The filter size have to be adapted to the size of the input
% signal $x$.

% clear all;
src = 'C:/testImages/Perception/WaterSurface/WaterSurface1600.bmp';
x = im2double(rgb2gray(imread(src)));
filters = morlet_filter_bank_2d(size(x));
[x_phi,x_psi]=wavelet_2d(x,filters);
figure;

colormap gray;

subplot(1,2,1)
imagesc(real(x_psi{1}))
axis square
axis off
title({'Real part of the first';'wavelet transform coefficient'});
subplot(1,2,2)
imagesc(imag(x_psi{1}))
axis square
axis off
title({'Imaginary part of the first';'wavelet transform coefficient'});

%% Options
% Several options are available with wavelet_2d that allow the user to
% change the output or the way to compute it.
%
% * options.x_resolution = 0 changes the resolution on which
% the wavelet transform is computed by a factor 2.
% * options.precision = 'single' allows to compute either with 'double' or
% 'single'.
% * options.oversampling = 1 oversamples the signal by a factor 2.
% * options.psi_mask = [1 ... 1] is of a size the number of filters and
% allows to compute the signal only when the corresponding wavelet has a
% '1' in its respective psi_mask.


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Physcia leucomelaena var. subcomosa Nyl.

### Remarks
null


text:
package com.gx.chain.fp

object RequestHandler {
  // Handler Interface
  type Type = PartialFunction[Request, Response]

  // Concrete Handler
  val developer: RequestHandler.Type = {
    case req@FixBugRequest(desc) =>
      println(s"I am a developer. I can fix this bug: $desc")
      Response(req, handled = true)
  }

  // Concrete Handler
  val architect: RequestHandler.Type = {
    case req@FeatureRequest(desc) =>
      println(s"I am a architect. I can implement this feature: $desc")
      Response(req, handled = true)
  }

  // Concrete Handler
  val CTO: RequestHandler.Type = {
    case req@ProductRequest(desc) =>
      println(s"I am a CTO. I can make this product: $desc")
      Response(req, handled = true)
  }

  // Concrete Handler
  val noOne: RequestHandler.Type = {
    case req: Request =>
      println("No one is responsible for this request.")
      Response(req, handled = false)
  }

}


text:
<?php
namespace SpsBundle\Tests\Entity;

use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

class WloknoTest extends KernelTestCase
{
	 /**
     * @var \Doctrine\ORM\EntityManager
     */
    private $em;

    /**
     * {@inheritDoc}
     */
    public function setUp()
    {
        self::bootKernel();
        $this->em = static::$kernel->getContainer()
            ->get('doctrine')
            ->getManager()
        ;
    }

    public function testSearchByCategoryName()
    {
        $products = $this->em
            ->getRepository('SpsBundle:Wlokno')
            ->findAll();
        ;
        $this->assertGreaterThan(
        		0,$products);
    }

    /**
     * {@inheritDoc}
     */
    protected function tearDown()
    {
        parent::tearDown();
        $this->em->close();
    }
}


text:
package org.wso2.appserver.integration.common.utils;

import java.io.File;

public class ASIntegrationConstants {
    public static final String JAGGERY_APPLICATION = "jaggery";
    public static final String WEB_APPLICATION = "webapps";
    public static final String AS_PRODUCT_GROUP = "AS";
    public static final String AS_INSTANCE_0002 = "appServerInstance0002";
    public static final String AS_INSTANCE_0003 = "appServerInstance0003";
    public static final String CONTEXT_XPATH_DATA_SOURCE = "//datasources/datasource[@name='%s']";
    public static final String PASSWORD_PROPERTY_SECRET_ALIAS_KEY = "svns:secretAlias";
    public static final String PASSWORD_PROPERTY_SECRET_ALIAS_VALUE = "svns:secretAlias";
    public static final String SVN_SECRET_ALIAS_WSO2_DATASOURCE = "Datasources.WSO2_CARBON_DB.Configuration.Password";
    public static final String ENCRYPTED_PASSWD_URL =
            "//datasources-configuration/datasources/datasource[name='WSO2_CARBON_DB']/definition[@type='RDBMS']" +
            "/configuration/password";
    public static final String DATA_SOURCE_URL = "//datasources/datasource[@name='%s']/url";
    public static final String DATA_SOURCE_DRIVER_CLASS_NAME = "//datasources/datasource[@name='%s']/driverClassName";
    public static final String DATA_SOURCE_DB_USER_NAME = "//datasources/datasource[@name='%s']/username";
    public static final String DATA_SOURCE_DB_PASSWORD = "//datasources/datasource[@name='%s']/password";
    public static final String TARGET_RESOURCE_LOCATION =
            System.getProperty("basedir", ".") + File.separator + "target" + File.separator + "resources" +
            File.separator + "artifacts" + File.separator + "AS" + File.separator;
    public static final int WEBAPP_WAIT_PERIOD = 50000;
}


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

<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>org.apache.lucene.codecs.intblock (Lucene 4.6.1 API)</title>
<meta name="date" content="2014-01-23">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

org.apache.lucene.codecs.intblock

Interfaces

FixedIntBlockIndexInput.BlockReader

VariableIntBlockIndexInput.BlockReader

Classes

FixedIntBlockIndexInput

FixedIntBlockIndexOutput

VariableIntBlockIndexInput

VariableIntBlockIndexOutput


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ProcessingStrategy.cs" company="Sitecore Corporation">
//   Copyright (c) Sitecore Corporation 1999-2015
// </copyright>
// <summary>
//   Defines the processing strategy class.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
// Copyright 2015 Sitecore Corporation A/S
// 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.
// -------------------------------------------------------------------------------------------

namespace Sitecore.Ecommerce.OrderManagement
{
  using Orders;

  /// <summary>
  /// Defines the processing strategy class.
  /// </summary>
  public abstract class ProcessingStrategy
  {
    /// <summary>
    /// Runs the processor.
    /// </summary>
    /// <param name="order">The order.</param>
    public abstract void Process([NotNull] Order order);
  }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Fungi argentini 3: no. 36 (1880)

#### Original name
Uromyces cisneroanus f. cisneroanus

### Remarks
null


text: etcdctl rm --recursive --dir /stolon || true


text:
#ifndef __platform_mutex_h__
#define __platform_mutex_h__

#ifdef _WIN32

#include "win.h"

#ifdef __cplusplus
namespace platform
{
#endif

typedef CRITICAL_SECTION mutex_t;

static __inline int mutex_init(mutex_t *m)
{
 InitializeCriticalSection(m);
 return 0;
}

static __inline void mutex_destroy(mutex_t *m)
{
 DeleteCriticalSection(m);
}

static __inline void mutex_lock(mutex_t *m)
{
 EnterCriticalSection(m);
}

static __inline void mutex_unlock(mutex_t *m)
{
 LeaveCriticalSection(m);
}

#ifdef __cplusplus
} /* end namespace */
#endif

#else

#include <pthread.h>
#include <assert.h>

#ifdef __cplusplus
namespace platform
{
#endif

typedef pthread_mutex_t mutex_t;

static __inline int mutex_init(mutex_t *m)
{
 return pthread_mutex_init(m, 0);
}

static __inline void mutex_destroy(mutex_t *m)
{
 int result = pthread_mutex_destroy(m);
 assert(result == 0);
 (void) result;
}

static __inline void mutex_lock(mutex_t *m)
{
 int result = pthread_mutex_lock(m);
 assert(result == 0);
 (void) result;
}

static __inline void mutex_unlock(mutex_t *m)
{
 int result = pthread_mutex_unlock(m);
 assert(result == 0);
 (void) result;
}

#ifdef __cplusplus
} /* end namespace */
#endif

#endif

#endif /* __platform_mutex_h__ */


text:
FreeVoteBot
===========

A vote bot for #freecode on irc.rizon.net


text:
demuxer_t* demux_open_rtp(demuxer_t* demuxer);

// Test whether a RTP demuxer is for a MPEG stream:
int demux_is_mpeg_rtp_stream(demuxer_t* demuxer);

// Test whether a RTP demuxer contains combined (multiplexed)
// audio+video (and so needs to be demuxed by higher-level code):
int demux_is_multiplexed_rtp_stream(demuxer_t* demuxer);

// Read from a RTP demuxer:
int demux_rtp_fill_buffer(demuxer_t *demux, demux_stream_t* ds);

// Close a RTP demuxer
void demux_close_rtp(demuxer_t* demuxer);

#endif


text:
#include <InputManager.hpp>
#include <InputListener.hpp>
#include <KeyboardListener.hpp>
#include <MouseListener.hpp>

using namespace ooge;

template<> InputManager *Singleton<InputManager>::ms_Singleton = 0;

InputManager::InputManager()
: mKeyboard(new KeyboardListener()), mMouse(new MouseListener())
{
	AddInputListener(std::string("keyboard"), mKeyboard);
	AddInputListener(std::string("mouse"), mMouse);
}

InputManager::~InputManager()
{
	ClearInputListeners();
}

InputListener *InputManager::AddInputListener(const std::string &name, InputListener *addListener)
{
	ConstInputListenerIt it = mInputListenerMap.find(name);
	if(it != mInputListenerMap.end())
		return (*it).second; // already in system

	mInputListenerMap.insert(std::pair<std::string, InputListener *>(name, addListener));
	addListener->Update();
	return addListener;
}

InputListener *InputManager::GetListenerByName(const std::string &name) const
{
	ConstInputListenerIt it = mInputListenerMap.find(name);
	return (it != mInputListenerMap.end()) ? (*it).second : NULL;
}

bool InputManager::RemoveInputListener(const std::string &name)
{
	InputListenerIt it = mInputListenerMap.find(name);
	if(it != mInputListenerMap.end())
	{
		delete (*it).second;
		mInputListenerMap.erase(it);
		return true;
	}
	return false;
}

bool InputManager::RemoveInputListener(InputListener *removeListener)
{
	InputListenerIt it = mInputListenerMap.begin();
	for(; it != mInputListenerMap.end(); ++it)
	{
		if(it->second == removeListener)
		{
			delete (*it).second;
			mInputListenerMap.erase(it);
			return true;
		}
	}
	return false;
}

void InputManager::ClearInputListeners()
{
	if(!mInputListenerMap.empty())
	{
		InputListenerIt it = mInputListenerMap.begin();
		for(; it != mInputListenerMap.end(); ++it)
		{
			delete (*it).second;
		}
	}

	mInputListenerMap.clear();
}

void InputManager::UpdateListener()
{
	ConstInputListenerIt it = mInputListenerMap.begin();
	for(; it != mInputListenerMap.end(); ++it)
	{
		(*it).second->Update();
	}
}

KeyboardListener *InputManager::GetKeyboardListener()
{
	return mKeyboard;
}

MouseListener *InputManager::GetMouseListener()
{
	return mMouse;
}

InputManager &InputManager::GetSingleton()
{
	assert(ms_Singleton);
		return (*ms_Singleton);
}

InputManager *InputManager::GetSingletonPtr()
{
	return ms_Singleton;
}


text:
<!--
Copyright 2017 Next Century Corporation

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.
-->

<style is="custom-style">

  /*
   Polymer includes a shim for CSS Custom Properties that we can use for application theming.
   Below, you'll find the default palette for the Polymer Starter Kit layout. Feel free to play
   with changing the colors used or generate your own palette of colours at MaterialPalette.com.

   See https://www.polymer-project.org/1.0/docs/devguide/styling.html#xscope-styling-details
   for further information on custom CSS properties.
   */

  /* Application theme */

  :root {
    /* From main.css */
    --main-text-color: #37474F; /* paper-blue-grey-800 */

    /* Now I'm not sure why this variable exists since polymer looks for --primary-color */
    --default-primary-color: #455A64; /* paper-blue-grey-700 */

    --dark-primary-color: #263238; /* paper-blue-grey-900 */
    --primary-color: var(--default-primary-color);
    --light-primary-color: #CFD8DC;
    --text-primary-color: #ffffff; /*text/icons*/
    --accent-color: #FFB300;
    --primary-background-color: #CFD8DC; /* paper-blue-grey-100 */
    --primary-text-color: #212121;
    --secondary-text-color: #727272;
    --disabled-text-color: #bdbdbd; /* paper-grey-400 */
    --divider-color: #B6B6B6;
    --facet-background-color: #B0BEC5;

    /* Custom variables */
    --dark-accent-color: #FF8F00;
    --link-text-color: #2196F3;
    --dark-link-text-color: #1565C0;

    /* Colors from the Polymer Material Palette http://www.materialpalette.com/ and https://github.com/PolymerElements/paper-styles/blob/master/color.html */
    --amber: var(--paper-amber-500);
    --background-amber: var(--paper-amber-100);
    --blue: var(--paper-blue-500);
    --background-blue: var(--paper-blue-100);
    --blue-grey: var(--paper-blue-grey-500);
    --background-blue-grey: var(--paper-blue-grey-100);
    --brown: var(--paper-brown-500);
    --background-brown: var(--paper-brown-100);
    --cyan: var(--paper-cyan-500);
    --background-cyan: var(--paper-cyan-100);
    --deep-orange: var(--paper-deep-orange-500);
    --background-deep-orange: var(--paper-deep-orange-100);
    --deep-purple: var(--paper-deep-purple-500);
    --background-deep-purple: var(--paper-deep-purple-100);
    --green: var(--paper-green-500);
    --background-green: var(--paper-green-100);
    --grey: var(--paper-grey-500);
    --background-grey: var(--paper-grey-100);
    --indigo: var(--paper-indigo-500);
    --background-indigo: var(--paper-indigo-100);
    --light-blue: var(--paper-light-blue-500);
    --background-light-blue: var(--paper-light-blue-100);
    --light-green: var(--paper-light-green-500);
    --background-light-green: var(--paper-light-green-100);
    --lime: var(--paper-lime-500);
    --background-lime: var(--paper-lime-100);
    --orange: var(--paper-orange-500);
    --background-orange: var(--paper-orange-100);
    --pink: var(--paper-pink-500);
    --background-pink: var(--paper-pink-100);
    --purple: var(--paper-purple-500);
    --background-purple: var(--paper-purple-100);
    --red: var(--paper-red-500);
    --background-red: var(--paper-red-100);
    --teal: var(--paper-teal-500);
    --background-teal: var(--paper-teal-100);
    --yellow: var(--paper-yellow-500);
    --background-yellow: var(--paper-yellow-100);

    /* Entity type colors */
    --entity-age-color: var(--red);
    --light-entity-age-color: var(--background-red);
    --entity-author-color: var(--red);
    --light-entity-author-color: var(--background-red);
    --entity-author_profile-color: var(--red);
    --light-entity-author_profile-color: var(--background-red);
    --entity-cache-color: var(--red);
    --light-entity-cache-color: var(--background-red);
    --entity-creation_date-color: var(--red);
    --light-entity-creation_date-color: var(--background-red);
    --entity-company-color: var(--red);
    --light-entity-company-color: var(--background-red);
    --entity-company_type-color: var(--red);
    --light-entity-company_type-color: var(--background-red);
    --entity-date-color: var(--red);
    --light-entity-date-color: var(--background-red);
    --entity-disclaimer-color: var(--red);
    --light-entity-disclaimer-color: var(--background-red);
    --entity-followed_by-color: var(--red);
    --light-entity-followed_by-color: var(--background-red);
    --entity-forum_name-color: var(--red);
    --light-entity-forum_name-color: var(--background-red);
    --entity-location-color: var(--red);
    --light-entity-location-color: var(--background-red);
    --entity-moderator-color: var(--red);
    --light-entity-moderator-color: var(--background-red);
    --entity-money-color: var(--green);
    --light-entity-money-color: var(--background-green);
    --entity-number_of_posts-color: var(--red);
    --light-entity-number_of_posts-color: var(--background-red);
    --entity-object_id-color: var(--red);
    --light-entity-object_id-color: var(--background-red);
    --entity-org-color: var(--orange);
    --light-entity-org-color: var(--background-orange);
    --entity-person-color: var(--purple);
    --light-entity-person-color: var(--background-purple);
    --entity-post_id-color: var(--red);
    --light-entity-post_id-color: var(--background-red);
    --entity-post_type-color: var(--red);
    --light-entity-post_type-color: var(--background-red);
    --entity-product-color: var(--brown);
    --light-entity-product-color: var(--background-brown);
    --entity-stocks_owned-color: var(--red);
    --light-entity-stocks_owned-color: var(--background-red);
    --entity-ticker-color: var(--blue);
    --light-entity-ticker-color: var(--background-blue);
    --entity-ticker_symbol-color: var(--red);
    --light-entity-ticker_symbol-color: var(--background-red);
    --entity-website-color: var(--red);
    --light-entity-website-color: var(--background-red);

    /* Components */

    /* paper-menu */
    --paper-menu-background-color: #fff;
    --menu-link-color: #111111;
  }

  body {
    /* Flexbox can cause scrollbars to be shown in IE when not needed so hide them. */
    overflow: hidden;
  }

  .white-input-container {
    /* paper-input */
    --paper-input-container-color: #dddddd;
    --paper-input-container-input-color: #ffffff;
    --paper-input-container-focus-color: #ffffff;
  }

  paper-button[accent]{
    --paper-button: {
      background-color: var(--accent-color);
    }
  }

  a{
    color: var(--link-text-color);
    text-decoration: none;
    cursor: pointer;
  }

  a:focus,
  a:hover{
    color: var(--dark-link-text-color);
    text-decoration: none;
  }

  paper-material {
    background-color: #FFFFFF;
  }

  .v-divider {
    width: 20px;
  }

  .h-divider {
    height: 20px;
  }

  .content {
    @apply(--layout-horizontal);
    margin-bottom: 20px;
    margin-right: 20px;
  }

  .content > * {
    margin-top: 20px;
    margin-left: 20px;
  }

  /* General styles */

  .container {
    @apply(--layout-horizontal);
    @apply(--layout-wrap);
  }

  .flexchild {
    @apply(--layout-flex);
    background-color: #dddddd;
  }

  ul {
    list-style: none;
  }

  paper-scroll-header-panel {
    height: 100%;
  }

  section {
    padding: 24px;
  }

  section > :first-child{
    margin-top: 0;
  }

  section > :last-child{
    margin-bottom: 0;
  }

  hr{
    background: none;
    border-width: 1px 0 0;
    border-style: solid;
    border-color: rgba(0,0,0,var(--dark-divider-opacity));
    margin: 20px 0;
  }

  /*********************************************************
  /*
  /*  New stuff for index.html. Maybe it goes in its own page style,
  /*  because right now this breaks the entity page style.
  /*
  /*********************************************************/

  /* Style icons in a dropdown menu*/
  paper-menu iron-icon {
    margin-right: 33px;
    opacity: 0.54;
  }

  /* Style the selected item in a dropdown menu */
  .paper-menu > .iron-selected {
    color: var(--accent-color);
  }

  /* Sidebar drawer mixin */
  paper-drawer-panel {
    --paper-drawer-panel-left-drawer-container: {
      background-color: var(--primary-background-color);
      border-right: 1px solid rgba(0,0,0,var(--dark-divider-opacity));
    };
  }

  /* Toolbar mixin */
  #navbar {
    --paper-toolbar-background: var(--dark-primary-color);
    --paper-toolbar-height: 80px;
  }

  #navbar modal-icon {
    --paper-icon-button: {
      margin: 20px 0 0;
    }
  }

  .show-fields {
    color: yellowgreen;
  }

  #navbar paper-icon-button[icon=menu] {
    /* Override default style */
    margin-right: 0px;
  }

  #navbar paper-button {
    --paper-button: {
      margin: 20px 0 0;
      min-width: initial;
      padding: 8px;
    }
  }

  #navbar paper-icon-button {
    --paper-icon-button: {
      margin: 20px 0 0;
    }
  }

  #navbar .toggle[active] {
    background-color: var(--text-primary-color);
    color: var(--dark-primary-color);
  }

  #navbar load-user-info {
    margin-top: 20px;
  }

  /* What is this? */
  paper-dialog.size {
    width: 800px;
    height: 800px;
    overflow: auto;
  }

  /* Spacer to match drawer width */
  #navbar .drawer-spacer {
    width: 200px;
  }

  /* Decreasing z-index for leaflet controls so that they
     don't overlap with the image gallery modal */
  .leaflet-top, .leaflet-bottom {
    z-index: 100;
  }

  .filter-header {
    cursor: pointer;
    /* Match the font-weight of the Sort label */
    font-weight: 500;
    line-height: 24px;
  }

  #menuDropdown .dropdown-content {
    background-color: var(--dark-primary-color);
    border: 1px solid var(--dark-primary-color);
    border-radius: 2px;
    color: var(--text-primary-color);
  }

  #menuDropdown .dropdown-content paper-icon-item {
    --paper-item-icon-width: 24px;
    --paper-item-icon: {
      margin-right: 10px;
    }
    --paper-icon-item: {
      border: 1px solid var(--text-primary-color);
      cursor: pointer;
      /* Below is needed for IE */
      line-height: 48px;
      min-width: 300px;
      /* Above is needed for IE */
    }
  }

  .green[active],
  .green:hover {
    color: yellowgreen;
  }

  .search-fields-dialog {
    max-width: 960px;
    margin: 0;
    padding: 30px;
  }

  .search-labels > div {
    line-height: 25px;
    padding-top: 20px;
    text-align: end;
  }

  .search-labels > .instructions {
    padding-top: 0;
    padding-bottom: 30px;
  }

  .search-labels > .date {
    padding-bottom: 10px;
  }

  .search-labels > .rows-1 {
    padding-bottom: 5px;
  }

  .search-labels > .rows-2 {
    padding-bottom: 55px;
  }

  .search-labels > .rows-3 {
    padding-bottom: 105px;
  }

  .search-fields-dialog paper-dropdown-menu,
  .search-fields-dialog paper-input {
    display: inline-block;
    --paper-input-container-color: var(--secondary-text-color);
    --paper-input-container-input-color: var(--dark-primary-color);
    --paper-input-container-focus-color: var(--dark-primary-color);
    --paper-input-container: {
      padding: 0 10px 4px;
      width: 260px;
    }
    --paper-input-container-input: {
      font-weight: 500;
    }
  }

  .search-fields-dialog paper-dropdown-menu {
    --paper-input-container: {
      padding: 20px 10px 4px;
      width: 260px;
    }
    --paper-input-container-input: {
      cursor: pointer;
    }
  }

  .search-fields-dialog paper-dropdown-menu paper-listbox {
    --paper-listbox-background-color: #fff;
    --paper-listbox: {
      padding: 0;
    }
  }

  .search-fields-dialog paper-dropdown-menu paper-listbox paper-item {
    --paper-item: {
      cursor: pointer;
      padding: 0 20px;
    }
  }

  .date-fields-container {
    padding: 20px 0 0;
  }

  .date-fields-container > date-picker-display {
    display: inline-block;
    margin: 0 10px;
    padding: 5px 0 9px;
    width: 260px;
    --date-select-bg-color: #ffffff;
    --date-select-text-color: #000000;
  }

  .search-fields-dialog .search-buttons {
    padding-top: 20px;
  }

  #searchPanel ::content #mainContainer {
    background-color: #ffffff;
    overflow: hidden;
  }

  #searchTitle {
    border-bottom: 1px solid var(--light-primary-color);
    padding: 15px 25px;
  }

  #searchTitle .paper-font-title {
    /* Match the height of the export button. */
    line-height: 30px;
  }

  #searchResults ::content iron-scroll-threshold {
    height: auto;
    max-height: none;
    position: absolute;
    bottom: 70px;
    top: 60px;
    left: 0;
    right: 0;
  }

  #searchResults ::content loading-spinner,
  #searchResults ::content .show-more {
    border-top: 1px solid var(--light-primary-color);
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
  }

  #searchResults ::content loading-spinner {
    padding-top: 10px;
  }

  #searchResults ::content .show-more {
    padding-top: 20px;
  }

  elastic-sort-input ::content label {
    /* Vertically align the label with the dropdown menu. */
    line-height: 30px;
    padding-top: 25px;
  }

  elastic-sort-input ::content paper-menu {
    /* Set the min-width so 'Best Match' won't wrap to a second line. */
    min-width: 120px;
    padding: 0px;
  }

  elastic-sort-input ::content paper-item {
    cursor: pointer;
    /* Needed for IE */
    line-height: 48px;
  }

  elastic-sort-input ::content paper-dropdown-menu {
    padding: 0 10px;
    width: 150px;
  }

  image-gallery-popup ::content paper-dialog {
    /* Needed for images in the similar image search dialog. */
    background: rgba(0, 0, 0, 0.5);
  }

  .drawer-header {
    --paper-toolbar-height: auto;
    background: inherit;
    color: inherit;
  }

  .selected-facets-header {
    font-weight: 500;
    /* Same height as the selected-facet-display components. */
    line-height: 30px;
  }

  checkbox-list-display ::content paper-checkbox {
    margin-top: 5px;
  }

  checkbox-list-display ::content paper-checkbox #checkboxLabel {
    line-height: 20px;
  }

  selected-facets-display {
    --selected-facet-bg-color: var(--facet-background-color);
    --selected-facet-text-color: var(--primary-text-color);
    --selected-facet-icon-hover-color: #fff;
  }

  selected-facets-display ::content .item {
    border-radius: 3px;
  }

  aggregation-popup ::content .bar,
  feature-aggregation ::content .bar {
    background-color: var(--facet-background-color);
  }

  aggregation-popup ::content .bar-count,
  feature-aggregation ::content .bar-count {
    color: var(--primary-text-color);
    font-weight: normal;
  }

  .filter-list > date-picker-display {
    padding-bottom: 5px;
    padding-top: 15px;
  }

  @media all and (min-width: 500px) and (max-width: 650px) {
    .search-options-title {
      width: 100px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .search-fields-selected {
      padding: 0px 10px 10px 10px;
    }
  }

  @media all and (min-width: 0px) and (max-width: 500px) {
    .search-options-title {
      display: none;
    }

    .search-fields-selected {
      padding: 0px 10px 10px 10px;
    }
  }

  /*********************************************************/

  /* Material Design Adaptive Breakpoints */
  /*
    Below you'll find CSS media queries based on the breakpoint guidance
    published by the Material Design team. You can choose to use, customise
    or remove these breakpoints based on your needs.

    http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoints
   */

  /* mobile-small */
  @media all and (min-width: 0) and (max-width: 360px) and (orientation: portrait) { }
  /* mobile-large */
  @media all and (min-width: 361px) and (orientation: portrait) { }
  /* mobile-small-landscape */
  @media all and (min-width: 0) and (max-width: 480px) and (orientation: landscape) { }
  /* mobile-large-landscape */
  @media all and (min-width: 481px) and (orientation: landscape) { }
  /* tablet-small-landscape */
  @media all and (min-width: 600px) and (max-width: 960px) and (orientation: landscape) { }
  /* tablet-large-landscape */
  @media all and (min-width: 961px) and (orientation: landscape) { }
  /* tablet-small */
  @media all and (min-width: 600px) and (orientation: portrait) { }
  /* tablet-large */
  @media all and (min-width: 601px) and (max-width: 840px) and (orientation : portrait) { }
  /* desktop-x-small-landscape */
  @media all and (min-width: 0) and (max-width: 480px) and (orientation: landscape) { }
  /* desktop-x-small */
  @media all and (min-width: 0) and (max-width: 480px) and (max-aspect-ratio: 4/3) { }
  /* desktop-small-landscape */
  @media all and (min-width: 481px) and (max-width: 840px) and (orientation: landscape) { }
  /* desktop-small */
  @media all and (min-width: 481px) and (max-width: 840px) and (max-aspect-ratio: 4/3) { }
  /* desktop-medium-landscape */
  @media all and (min-width: 841px) and (max-width: 1280px) and (orientation: landscape) { }
  /* desktop-medium */
  @media all and (min-width: 841px) and (max-width: 1280px) and (max-aspect-ratio: 4/3) { }
  /* desktop-large */
  @media all and (min-width: 1281px) and (max-width: 1600px) { }
  /* desktop-xlarge */
  @media all and (min-width: 1601px) and (max-width: 1920px) { }
</style>


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data.Common;
using System.Diagnostics.Contracts;
using System.Dynamic;
using System.Linq.Expressions;
using System.Reflection;

namespace BusterWood.Mapper
{
    /// <summary>
    /// A row un-typed returned from the database, which can be accessed via <see cref="IReadOnlyDictionary{T1,T2}"/> methods
    /// or dynamically by casting this object as 'dynamic'.
    /// </summary>
    public class DynamicRow : IDynamicMetaObjectProvider, IReadOnlyDictionary<string, object>
    {
        readonly IReadOnlyDictionary<string, int> ordinalsByName;
        readonly object[] values;

        public DynamicRow(IReadOnlyDictionary<string, int> ordinalsByName, object[] values)
        {
            Contract.Requires(ordinalsByName != null);
            Contract.Requires(values != null);
            Contract.Requires(ordinalsByName.Count > 0);
            Contract.Requires(ordinalsByName.Count <= values.Length); // there might be less names due to duplicates
            Contract.Requires(Contract.ForAll(ordinalsByName, pair => pair.Value >= 0 && pair.Value < values.Length));

            this.ordinalsByName = ordinalsByName;
            this.values = values;
        }

        /// <summary>
        /// Used when this object is cast to 'dynamic'
        /// </summary>
        public DynamicMetaObject GetMetaObject(Expression parameter) => new DynamicRowMetaObject(parameter, BindingRestrictions.Empty, this);

        public object this[string key]
        {
            get
            {
                int ordinal;
                return ordinalsByName.TryGetValue(key, out ordinal) ? values[ordinal] : null;
            }
        }

        public object this[int ordinal] => values[ordinal];
        public int Count => values.Length;
        public IEnumerable<string> Keys => ordinalsByName.Keys;
        public IEnumerable<object> Values => values;
        public bool ContainsKey(string key) => ordinalsByName.ContainsKey(key);
        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

        public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
        {
            foreach (var pair in ordinalsByName)
            {
                yield return new KeyValuePair<string, object>(pair.Key, values[pair.Value]);
            }
        }

        public bool TryGetValue(string key, out object value)
        {
            int ordinal;
            if (ordinalsByName.TryGetValue(key, out ordinal))
            {
                value = values[ordinal];
                return true;
            }
            value = null;
            return false;
        }
    }

    class DynamicRowMetaObject : DynamicMetaObject
    {
        static readonly MethodInfo GetValue = typeof(IReadOnlyDictionary<string, object>).GetProperty("Item").GetGetMethod();

        public DynamicRowMetaObject(Expression expression, BindingRestrictions restrictions) : base(expression, restrictions)
        {
        }

        public DynamicRowMetaObject(Expression expression, BindingRestrictions restrictions, object value) : base(expression, restrictions, value)
        {
        }

        DynamicMetaObject CallMethod(MethodInfo method, Expression[] parameters)
        {
            return new DynamicMetaObject(
                Expression.Call(Expression.Convert(Expression, LimitType), method, parameters),
                BindingRestrictions.GetTypeRestriction(Expression, LimitType)
            );
        }

        public override DynamicMetaObject BindGetMember(GetMemberBinder binder)
        {
            return CallMethod(GetValue, new Expression[] { Expression.Constant(binder.Name) });
        }

        ///<remarks>Needed for Visual basic dynamic support</remarks>
        public override DynamicMetaObject BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args)
        {
            return CallMethod(GetValue, new Expression[] { Expression.Constant(binder.Name) });
        }
    }

    /// <summary>
    /// A sequence of <see cref="DynamicRow"/> where each item in the sequence is a row returned from a database query
    /// </summary>
    public struct DynamicDataSequence : IEnumerable<DynamicRow>, IDisposable
    {
        readonly DbDataReader reader;
        readonly Dictionary<string, int> metadata;

        public DynamicDataSequence(DbDataReader reader)
        {
            Contract.Requires(reader != null);
            this.reader = reader;

            metadata = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
            for (int i = 0; i < reader.FieldCount; i++)
            {
                var name = reader.GetName(i);
                if (!metadata.ContainsKey(name))  // columns can have duplicate names, just add the first one
                    metadata.Add(name, i);
            }
        }

        public void Dispose()
        {
            reader.Dispose();
        }

        public IEnumerator<DynamicRow> GetEnumerator()
        {
            while (reader.Read())
            {
                var values = new object[metadata.Count];
                reader.GetValues(values);
                yield return new DynamicRow(metadata, values);
            }
            Dispose();
        }

        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
    }
}


text:
@interface MiliController : UIViewController <UITableViewDelegate, UITableViewDataSource>

@end


text:
package org.estgroup.phphub.common.qualifier;

import android.support.annotation.StringDef;

import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import static org.estgroup.phphub.common.qualifier.UserTopicType.*;

@Retention(SOURCE)
@StringDef({
        USER_TOPIC_TYPE,
        USER_TOPIC_FOLLOW_TYPE,
        USER_TOPIC_FAVORITE_TYPE
})
public @interface UserTopicType {
    String USER_TOPIC_TYPE = "user_topic_type";

    String USER_TOPIC_FOLLOW_TYPE = "user_topic_follow_type";

    String USER_TOPIC_FAVORITE_TYPE = "user_topic_favorite_type";

}