text:
package io.debezium.connector.mysql;

import io.debezium.config.CommonConnectorConfig;
import io.debezium.config.Configuration;
import io.debezium.config.EnumeratedValue;
import io.debezium.config.Field;
import io.debezium.config.Field.ValidationOutput;
import io.debezium.connector.AbstractSourceInfo;
import io.debezium.connector.SourceInfoStructMaker;
import io.debezium.heartbeat.Heartbeat;
import io.debezium.jdbc.JdbcValueConverters.BigIntUnsignedMode;
import io.debezium.jdbc.TemporalPrecisionMode;
import io.debezium.relational.RelationalDatabaseConnectorConfig;
import io.debezium.relational.history.DatabaseHistory;
import io.debezium.relational.history.KafkaDatabaseHistory;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.common.config.ConfigDef.Importance;
import org.apache.kafka.common.config.ConfigDef.Type;
import org.apache.kafka.common.config.ConfigDef.Width;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.math.BigDecimal;
import java.time.Duration;
import java.util.Random;

/**
 * The configuration properties.
 */
public class MySqlConnectorConfig extends RelationalDatabaseConnectorConfig {

  private static final Logger LOGGER = LoggerFactory.getLogger(MySqlConnectorConfig.class);
  protected static final String DATABASE_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG
    = "\"database.include.list\" or \"database.whitelist\" is already specified";

  /**
   * The set of predefined BigIntUnsignedHandlingMode options or aliases.
   */
  public enum BigIntUnsignedHandlingMode implements EnumeratedValue {
    /**
     * Represent {@code BIGINT UNSIGNED} values as precise {@link BigDecimal} values, which are
     * represented in change events in a binary form. This is precise but difficult to use.
     */
    PRECISE("precise"),

    /**
     * Represent {@code BIGINT UNSIGNED} values as precise {@code long} values. This may be less precise
     * but is far easier to use.
     */
    LONG("long");

    private final String value;

    BigIntUnsignedHandlingMode(String value) {
      this.value = value;
    }

    @Override
    public String getValue() {
      return value;
    }

    public BigIntUnsignedMode asBigIntUnsignedMode() {
      switch (this) {
        case LONG:
          return BigIntUnsignedMode.LONG;
        case PRECISE:
        default:
          return BigIntUnsignedMode.PRECISE;
      }
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @return the matching option, or null if no match is found
     */
    public static BigIntUnsignedHandlingMode parse(String value) {
      if (value == null) {
        return null;
      }
      value = value.trim();
      for (BigIntUnsignedHandlingMode option : BigIntUnsignedHandlingMode.values()) {
        if (option.getValue().equalsIgnoreCase(value)) {
          return option;
        }
      }
      return null;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @param defaultValue the default value; may be null
     * @return the matching option, or null if no match is found and the non-null default is invalid
     */
    public static BigIntUnsignedHandlingMode parse(String value, String defaultValue) {
      BigIntUnsignedHandlingMode mode = parse(value);
      if (mode == null && defaultValue != null) {
        mode = parse(defaultValue);
      }
      return mode;
    }
  }

  /**
   * The set of predefined SnapshotMode options or aliases.
   */
  public enum SnapshotMode implements EnumeratedValue {

    /**
     * Perform a snapshot when it is needed.
     */
    WHEN_NEEDED("when_needed", true),

    /**
     * Perform a snapshot only upon initial startup of a connector.
     */
    INITIAL("initial", true),

    /**
     * Perform a snapshot of only the database schemas (without data) and then begin reading the binlog.
     * This should be used with care, but it is very useful when the change event consumers need only the changes
     * from the point in time the snapshot is made (and doesn't care about any state or changes prior to this point).
     */
    SCHEMA_ONLY("schema_only", false),

    /**
     * Perform a snapshot of only the database schemas (without data) and then begin reading the binlog at the current
     * binlog position. This can be used for recovery only if the connector has existing offsets and the
     * database.history.kafka.topic does not exist (deleted). This recovery option should be used with care as it
     * assumes there have been no schema changes since the connector last stopped, otherwise some events during the
     * gap may be processed with an incorrect schema and corrupted.
     */
    SCHEMA_ONLY_RECOVERY("schema_only_recovery", false),

    /**
     * Never perform a snapshot and only read the binlog. This assumes the binlog contains all the history of those
     * databases and tables that will be captured.
     */
    NEVER("never", false),

    /**
     * Perform a snapshot and then stop before attempting to read the binlog.
     */
    INITIAL_ONLY("initial_only", true);

    private final String value;
    private final boolean includeData;

    SnapshotMode(String value, boolean includeData) {
      this.value = value;
      this.includeData = includeData;
    }

    @Override
    public String getValue() {
      return value;
    }

    /**
     * Whether this snapshotting mode should include the actual data or just the
     * schema of captured tables.
     */
    public boolean includeData() {
      return includeData;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @return the matching option, or null if no match is found
     */
    public static SnapshotMode parse(String value) {
      if (value == null) {
        return null;
      }
      value = value.trim();
      for (SnapshotMode option : SnapshotMode.values()) {
        if (option.getValue().equalsIgnoreCase(value)) {
          return option;
        }
      }
      return null;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @param defaultValue the default value; may be null
     * @return the matching option, or null if no match is found and the non-null default is invalid
     */
    public static SnapshotMode parse(String value, String defaultValue) {
      SnapshotMode mode = parse(value);
      if (mode == null && defaultValue != null) {
        mode = parse(defaultValue);
      }
      return mode;
    }
  }

  /**
   *
   */
  public enum SnapshotNewTables implements EnumeratedValue {
    /**
     * Do not snapshot new tables
     */
    OFF("off"),

    /**
     * Snapshot new tables in parallel to normal binlog reading.
     */
    PARALLEL("parallel");

    private final String value;

    SnapshotNewTables(String value) {
      this.value = value;
    }

    @Override
    public String getValue() {
      return value;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @return the matching option, or null if no match is found
     */
    public static SnapshotNewTables parse(String value) {
      if (value == null) {
        return null;
      }
      value = value.trim();
      for (SnapshotNewTables option : SnapshotNewTables.values()) {
        if (option.getValue().equalsIgnoreCase(value)) {
          return option;
        }
      }
      return null;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @param defaultValue the default value; may be null
     * @return the matching option, or null if no match is found and the non-null default is invalid
     */
    public static SnapshotNewTables parse(String value, String defaultValue) {
      SnapshotNewTables snapshotNewTables = parse(value);
      if (snapshotNewTables == null && defaultValue != null) {
        snapshotNewTables = parse(defaultValue);
      }
      return snapshotNewTables;
    }
  }

  /**
   * The set of predefined Snapshot Locking Mode options.
   */
  public enum SnapshotLockingMode implements EnumeratedValue {

    /**
     * This mode will block all writes for the entire duration of the snapshot.
     *
     * Replaces deprecated configuration option snapshot.locking.minimal with a value of false.
     */
    EXTENDED("extended"),

    /**
     * The connector holds the global read lock for just the initial portion of the snapshot while the connector reads
     * the database schemas and other metadata. The remaining work in a snapshot involves selecting all rows from each
     * table, and this can be done in a consistent fashion using the REPEATABLE READ transaction even when the global
     * read lock is no longer held and while other MySQL clients are updating the database.
     *
     * Replaces deprecated configuration option snapshot.locking.minimal with a value of true.
     */
    MINIMAL("minimal"),

    /**
     * The connector holds a (Percona-specific) backup lock for just the initial portion of the snapshot while the
     * connector reads the database schemas and other metadata. This lock will only block DDL and DML on
     * non-transactional tables (MyISAM etc.). The remaining work in a snapshot involves selecting all rows from each
     * table, and this can be done in a consistent fashion using the REPEATABLE READ transaction even when the global
     * read lock is no longer held and while other MySQL clients are updating the database.
     */
    MINIMAL_PERCONA("minimal_percona"),

    /**
     * This mode will avoid using ANY table locks during the snapshot process.  This mode can only be used with
     * SnapShotMode set to schema_only or schema_only_recovery.
     */
    NONE("none");

    private final String value;

    SnapshotLockingMode(String value) {
      this.value = value;
    }

    @Override
    public String getValue() {
      return value;
    }

    public boolean usesMinimalLocking() {
      return value.equals(MINIMAL.value) || value.equals(MINIMAL_PERCONA.value);
    }

    /**
     * Determine which flavour of MySQL locking to use.
     *
     * @return the correct SQL to obtain a global lock for the current mode
     */
    public String getLockStatement() {
      if (value.equals(MINIMAL_PERCONA.value)) {
        return "LOCK TABLES FOR BACKUP";
      } else {
        return "FLUSH TABLES WITH READ LOCK";
      }
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @return the matching option, or null if no match is found
     */
    public static SnapshotLockingMode parse(String value) {
      if (value == null) {
        return null;
      }
      value = value.trim();
      for (SnapshotLockingMode option : SnapshotLockingMode.values()) {
        if (option.getValue().equalsIgnoreCase(value)) {
          return option;
        }
      }
      return null;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @param defaultValue the default value; may be null
     * @return the matching option, or null if no match is found and the non-null default is invalid
     */
    public static SnapshotLockingMode parse(String value, String defaultValue) {
      SnapshotLockingMode mode = parse(value);
      if (mode == null && defaultValue != null) {
        mode = parse(defaultValue);
      }
      return mode;
    }
  }

  /**
   * The set of predefined SecureConnectionMode options or aliases.
   */
  public enum SecureConnectionMode implements EnumeratedValue {
    /**
     * Establish an unencrypted connection.
     */
    DISABLED("disabled"),

    /**
     * Establish a secure (encrypted) connection if the server supports secure connections.
     * Fall back to an unencrypted connection otherwise.
     */
    PREFERRED("preferred"),
    /**
     * Establish a secure connection if the server supports secure connections.
     * The connection attempt fails if a secure connection cannot be established.
     */
    REQUIRED("required"),
    /**
     * Like REQUIRED, but additionally verify the server TLS certificate against the configured Certificate Authority
     * (CA) certificates. The connection attempt fails if no valid matching CA certificates are found.
     */
    VERIFY_CA("verify_ca"),
    /**
     * Like VERIFY_CA, but additionally verify that the server certificate matches the host to which the connection is
     * attempted.
     */
    VERIFY_IDENTITY("verify_identity");

    private final String value;

    SecureConnectionMode(String value) {
      this.value = value;
    }

    @Override
    public String getValue() {
      return value;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @return the matching option, or null if no match is found
     */
    public static SecureConnectionMode parse(String value) {
      if (value == null) {
        return null;
      }
      value = value.trim();
      for (SecureConnectionMode option : SecureConnectionMode.values()) {
        if (option.getValue().equalsIgnoreCase(value)) {
          return option;
        }
      }
      return null;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @param defaultValue the default value; may be null
     * @return the matching option, or null if no match is found and the non-null default is invalid
     */
    public static SecureConnectionMode parse(String value, String defaultValue) {
      SecureConnectionMode mode = parse(value);
      if (mode == null && defaultValue != null) {
        mode = parse(defaultValue);
      }
      return mode;
    }
  }

  /**
   * The set of predefined Gtid New Channel Position options.
   */
  public enum GtidNewChannelPosition implements EnumeratedValue {

    /**
     * This mode will start reading new gtid channel from mysql servers last_executed position
     */
    LATEST("latest"),

    /**
     * This mode will start reading new gtid channel from earliest available position in server.
     * This is needed when during active-passive failover the new gtid channel becomes active and receiving writes.
     * #DBZ-923
     */
    EARLIEST("earliest");

    private final String value;

    GtidNewChannelPosition(String value) {
      this.value = value;
    }

    @Override
    public String getValue() {
      return value;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @return the matching option, or null if no match is found
     */
    public static GtidNewChannelPosition parse(String value) {
      if (value == null) {
        return null;
      }
      value = value.trim();
      for (GtidNewChannelPosition option : GtidNewChannelPosition.values()) {
        if (option.getValue().equalsIgnoreCase(value)) {
          return option;
        }
      }
      return null;
    }

    /**
     * Determine if the supplied value is one of the predefined options.
     *
     * @param value the configuration property value; may not be null
     * @param defaultValue the default value; may be null
     * @return the matching option, or null if no match is found and the non-null default is invalid
     */
    public static GtidNewChannelPosition parse(String value, String defaultValue) {
      GtidNewChannelPosition mode = parse(value);
      if (mode == null && defaultValue != null) {
        mode = parse(defaultValue);
      }
      return mode;
    }
  }

  /**
   * {@link Integer#MIN_VALUE Minimum value} used for fetch size hint.
   * See DBZ-94 for details.
   */
  protected static final int DEFAULT_SNAPSHOT_FETCH_SIZE = Integer.MIN_VALUE;

  private static final String DATABASE_WHITELIST_NAME = "database.whitelist";
  private static final String DATABASE_INCLUDE_LIST_NAME = "database.include.list";
  private static final String DATABASE_BLACKLIST_NAME = "database.blacklist";
  private static final String DATABASE_EXCLUDE_LIST_NAME = "database.exclude.list";

  /**
   * Default size of the binlog buffer used for examining transactions and
   * deciding whether to propagate them or not. A size of 0 disables the buffer,
   * all events will be passed on directly as they are passed by the binlog
   * client.
   */
  private static final int DEFAULT_BINLOG_BUFFER_SIZE = 0;

  public static final Field HOSTNAME = Field.create("database.hostname")
    .withDisplayName("Hostname")
    .withType(Type.STRING)
    .withWidth(Width.MEDIUM)
    .withImportance(Importance.HIGH)
    .withValidation(Field::isRequired)
    .withDescription("Resolvable hostname or IP address of the MySQL database server.");

  public static final Field PORT = Field.create("database.port")
    .withDisplayName("Port")
    .withType(Type.INT)
    .withWidth(Width.SHORT)
    .withDefault(3306)
    .withImportance(Importance.HIGH)
    .withValidation(Field::isInteger)
    .withDescription("Port of the MySQL database server.");

  public static final Field USER = Field.create("database.user")
    .withDisplayName("User")
    .withType(Type.STRING)
    .withWidth(Width.SHORT)
    .withImportance(Importance.HIGH)
    .withValidation(Field::isRequired)
    .withDescription("Name of the MySQL database user to be used when connecting to the database.");

  public static final Field PASSWORD = Field.create("database.password")
    .withDisplayName("Password")
    .withType(Type.PASSWORD)
    .withWidth(Width.SHORT)
    .withImportance(Importance.HIGH)
    .withDescription("Password of the MySQL database user to be used when connecting to the database.");

  public static final Field ON_CONNECT_STATEMENTS = Field.create("database.initial.statements")
    .withDisplayName("Initial statements")
    .withType(Type.STRING)
    .withWidth(Width.LONG)
    .withImportance(Importance.LOW)
    .withDescription(
      "A semicolon separated list of SQL statements to be executed when a JDBC connection (not binlog reading " +
        "connection) to the database is established. "
        + "Note that the connector may establish JDBC connections at its own discretion, so this should typically be " +
        "used for configuration of session parameters only,"
        + "but not for executing DML statements. Use doubled semicolon (';;') to use a semicolon as a character and " +
        "not as a delimiter.");

  public static final Field SERVER_NAME = RelationalDatabaseConnectorConfig.SERVER_NAME
    .withValidation(CommonConnectorConfig::validateServerNameIsDifferentFromHistoryTopicName);

  public static final Field SERVER_ID = Field.create("database.server.id")
    .withDisplayName("Cluster ID")
    .withType(Type.LONG)
    .withWidth(Width.LONG)
    .withImportance(Importance.HIGH)
    .withDefault(MySqlConnectorConfig::randomServerId)
    .withValidation(Field::isRequired, Field::isPositiveLong)
    .withDescription("A numeric ID of this database client, which must be unique across all "
                       + "currently-running database processes in the cluster. This connector joins the "
                       + "MySQL database cluster as another server (with this unique ID) so it can read "
                       + "the binlog. By default, a random number is generated between 5400 and 6400.");

  public static final Field SERVER_ID_OFFSET = Field.create("database.server.id.offset")
    .withDisplayName("Cluster ID offset")
    .withType(Type.LONG)
    .withWidth(Width.LONG)
    .withImportance(Importance.HIGH)
    .withDefault(10000L)
    .withDescription("Only relevant if parallel snapshotting is configured. During "
                       + "parallel snapshotting, multiple (4) connections open to the database "
                       + "client, and they each need their own unique connection ID. This offset is "
                       + "used to generate those IDs from the base configured cluster ID.");

  public static final Field SSL_MODE = Field.create("database.ssl.mode")
    .withDisplayName("SSL mode")
    .withEnum(SecureConnectionMode.class, SecureConnectionMode.DISABLED)
    .withWidth(Width.MEDIUM)
    .withImportance(Importance.MEDIUM)
    .withDescription("Whether to use an encrypted connection to MySQL. Options include"
                       + "'disabled' (the default) to use an unencrypted connection; "
                       + "'preferred' to establish a secure (encrypted) connection if the server supports secure "
                       + "connections, but fall back to an unencrypted connection otherwise; "
                       + "'required' to use a secure (encrypted) connection, and fail if one cannot be established; "
                       + "'verify_ca' like 'required' but additionally verify the server TLS certificate against the "
                       + "configured Certificate Authority "
                       + "(CA) certificates, or fail if no valid matching CA certificates are found; or"
                       + "'verify_identity' like 'verify_ca' but additionally verify that the server certificate "
                       + "matches the host to which the connection is attempted.");

  public static final Field SSL_KEYSTORE = Field.create("database.ssl.keystore")
    .withDisplayName("SSL Keystore")
    .withType(Type.STRING)
    .withWidth(Width.LONG)
    .withImportance(Importance.MEDIUM)
    .withDescription("Location of the Java keystore file containing an application process's own certificate and " +
                       "private key.");

  public static final Field SSL_KEYSTORE_PASSWORD = Field.create("database.ssl.keystore.password")
    .withDisplayName("SSL Keystore Password")
    .withType(Type.PASSWORD)
    .withWidth(Width.MEDIUM)
    .withImportance(Importance.MEDIUM)
    .withDescription(
      "Password to access the private key from the keystore file specified by 'ssl.keystore' configuration property " +
        "or the 'javax.net.ssl.keyStore' system or JVM property. This password is used to unlock the keystore file " +
        "(store password), and to decrypt the private key stored in the keystore (key password).");

  public static final Field SSL_TRUSTSTORE = Field.create("database.ssl.truststore")
    .withDisplayName("SSL Truststore")
    .withType(Type.STRING)
    .withWidth(Width.LONG)
    .withImportance(Importance.MEDIUM)
    .withDescription("Location of the Java truststore file containing the collection of CA certificates trusted by " +
                       "this application process (trust store).");

  public static final Field SSL_TRUSTSTORE_PASSWORD = Field.create("database.ssl.truststore.password")
    .withDisplayName("SSL Truststore Password")
    .withType(Type.PASSWORD)
    .withWidth(Width.MEDIUM)
    .withImportance(Importance.MEDIUM)
    .withDescription(
      "Password to unlock the keystore file (store password) specified by 'ssl.trustore' configuration property or " +
        "the 'javax.net.ssl.trustStore' system or JVM property.");

  public static final Field TABLES_IGNORE_BUILTIN = RelationalDatabaseConnectorConfig.TABLE_IGNORE_BUILTIN
    .withDependents(DATABASE_INCLUDE_LIST_NAME);

  /**
   * ===================== This is a diff from the original file ===========================
   * We basically just delete the usage of 'com.mysql.cj.jdbc.Driver' class.
   */
  public static final Field JDBC_DRIVER = Field.create("database.jdbc.driver")
    .withDisplayName("Jdbc Driver Class Name")
    .withType(Type.CLASS)
    .withWidth(Width.MEDIUM)
    .withImportance(Importance.LOW)
    .withValidation(Field::isClassName)
    .withDescription("JDBC Driver class name used to connect to the MySQL database server.");

  /**
   * A comma-separated list of regular expressions that match database names to be monitored.
   * Must not be used with {@link #DATABASE_BLACKLIST}.
   */
  public static final Field DATABASE_INCLUDE_LIST = Field.create(DATABASE_INCLUDE_LIST_NAME)
    .withDisplayName("Include Databases")
    .withType(Type.LIST)
    .withWidth(Width.LONG)
    .withImportance(Importance.HIGH)
    .withDependents(TABLE_INCLUDE_LIST_NAME)
    .withDescription("The databases for which changes are to be captured");

  /**
   * Old, backwards-compatible "whitelist" property.
   */
  @Deprecated
  public static final Field DATABASE_WHITELIST = Field.create(DATABASE_WHITELIST_NAME)
    .withDisplayName("Deprecated: Include Databases")
    .withType(Type.LIST)
    .withWidth(Width.LONG)
    .withImportance(Importance.LOW)
    .withInvisibleRecommender()
    .withDependents(TABLE_INCLUDE_LIST_NAME)
    .withDescription("The databases for which changes are to be captured (deprecated, use \""
                       + DATABASE_INCLUDE_LIST.name() + "\" instead)");

  /**
   * A comma-separated list of regular expressions that match database names to be excluded from monitoring.
   * Must not be used with {@link #DATABASE_INCLUDE_LIST}.
   */
  public static final Field DATABASE_EXCLUDE_LIST = Field.create(DATABASE_EXCLUDE_LIST_NAME)
    .withDisplayName("Exclude Databases")
    .withType(Type.STRING)
    .withWidth(Width.LONG)
    .withImportance(Importance.MEDIUM)
    .withValidation(MySqlConnectorConfig::validateDatabaseExcludeList)
    .withInvisibleRecommender()
    .withDescription("A comma-separated list of regular expressions that match database names to be excluded from " +
                       "monitoring");

  /**
   * Old, backwards-compatible "blacklist" property.
   */
  @Deprecated
  public static final Field DATABASE_BLACKLIST = Field.create(DATABASE_BLACKLIST_NAME)
    .withDisplayName("Deprecated: Exclude Databases")
    .withType(Type.STRING)
    .withWidth(Width.LONG)
    .withImportance(Importance.LOW)
    .withValidation(MySqlConnectorConfig::validateDatabaseExcludeList)
    .withInvisibleRecommender()
    .withDescription("A comma-separated list of regular expressions that match database names to be excluded from " +
                       "monitoring (deprecated, use \""
                       + DATABASE_EXCLUDE_LIST.name() + "\" instead)");

  /**
   * A comma-separated list of regular expressions that match source UUIDs in the GTID set used to find the binlog
   * position in the MySQL server. Only the GTID ranges that have sources matching one of these include patterns will
   * be used.
   * Must not be used with {@link #GTID_SOURCE_EXCLUDES}.
   */
  public static final Field GTID_SOURCE_INCLUDES = Field.create("gtid.source.includes")
    .withDisplayName("Include GTID sources")
    .withType(Type.LIST)
    .withWidth(Width.LONG)
    .withImportance(Importance.HIGH)
    .withDependents(TABLE_INCLUDE_LIST_NAME)
    .withDescription("The source UUIDs used to include GTID ranges when determine the starting position in the MySQL " +
                       "server's binlog.");

  /**
   * A comma-separated list of regular expressions that match source UUIDs in the GTID set used to find the binlog
   * position in the MySQL server. Only the GTID ranges that have sources matching none of these exclude patterns will
   * be used.
   * Must not be used with {@link #GTID_SOURCE_INCLUDES}.
   */
  public static final Field GTID_SOURCE_EXCLUDES = Field.create("gtid.source.excludes")
    .withDisplayName("Exclude GTID sources")
    .withType(Type.STRING)
    .withWidth(Width.LONG)
    .withImportance(Importance.MEDIUM)
    .withValidation(MySqlConnectorConfig::validateGtidSetExcludes)
    .withInvisibleRecommender()
    .withDescription("The source UUIDs used to exclude GTID ranges when determine the starting position in the MySQL " +
                       "server's binlog.");

  /**
   * If set to true, we will only produce DML events into Kafka for transactions that were written on MySQL servers
   * with UUIDs matching the filters defined by the {@link #GTID_SOURCE_INCLUDES} or {@link #GTID_SOURCE_EXCLUDES}
   * configuration options, if they are specified.
   *
   * Defaults to true.
   *
   * When true, either {@link #GTID_SOURCE_INCLUDES} or {@link #GTID_SOURCE_EXCLUDES} must be set.
   */
  public static final Field GTID_SOURCE_FILTER_DML_EVENTS = Field.create("gtid.source.filter.dml.events")
    .withDisplayName("Filter DML events")
    .withType(Type.BOOLEAN)
    .withWidth(Width.SHORT)
    .withImportance(Importance.MEDIUM)
    .withDefault(true)
    .withDescription(
      "If set to true, we will only produce DML events into Kafka for transactions that were written on mysql " +
        "servers with UUIDs matching the filters defined by the gtid.source.includes or gtid.source.excludes " +
        "configuration options, if they are specified.");

  /**
   * If set to 'latest', connector when encountering new GTID channel after job restart will start reading it from
   * the latest executed position (default). When set to 'earliest' the connector will start reading new GTID channels
   * from the first available position. This is useful when in active-passive mysql setup during failover new GTID
   * channel starts receiving writes, see DBZ-923.
   *
   * Defaults to latest.
   */
  public static final Field GTID_NEW_CHANNEL_POSITION = Field.create("gtid.new.channel.position")
    .withDisplayName("GTID start position")
    .withEnum(GtidNewChannelPosition.class, GtidNewChannelPosition.EARLIEST)
    .withWidth(Width.SHORT)
    .withImportance(Importance.MEDIUM)
    .withValidation(MySqlConnectorConfig::validateGtidNewChannelPositionNotSet)
    .withDescription(
      "If set to 'latest', when connector sees new GTID, it will start consuming gtid channel from the server latest " +
        "executed gtid position. If 'earliest' (the default) connector starts reading channel from first available " +
        "(not purged) gtid position on the server.");

  public static final Field CONNECTION_TIMEOUT_MS = Field.create("connect.timeout.ms")
    .withDisplayName("Connection Timeout (ms)")
    .withType(Type.INT)
    .withWidth(Width.SHORT)
    .withImportance(Importance.MEDIUM)
    .withDescription("Maximum time in milliseconds to wait after trying to connect to the database before timing out.")
    .withDefault(30 * 1000)
    .withValidation(Field::isPositiveInteger);

  public static final Field KEEP_ALIVE = Field.create("connect.keep.alive")
    .withDisplayName("Keep connection alive (true/false)")
    .withType(Type.BOOLEAN)
    .withWidth(Width.SHORT)
    .withImportance(Importance.LOW)
    .withDescription("Whether a separate thread should be used to ensure the connection is kept alive.")
    .withDefault(true)
    .withValidation(Field::isBoolean);

  public static final Field KEEP_ALIVE_INTERVAL_MS = Field.create("connect.keep.alive.interval.ms")
    .withDisplayName("Keep alive interval (ms)")
    .withType(Type.LONG)
    .withWidth(Width.SHORT)
    .withImportance(Importance.LOW)
    .withDescription("Interval in milliseconds to wait for connection checking if keep alive thread is used.")
    .withDefault(Duration.ofMinutes(1).toMillis())
    .withValidation(Field::isPositiveInteger);

  public static final Field ROW_COUNT_FOR_STREAMING_RESULT_SETS = Field.create("min.row.count.to.stream.results")
    .withDisplayName("Stream result set of size")
    .withType(Type.LONG)
    .withWidth(Width.MEDIUM)
    .withImportance(Importance.LOW)
    .withDescription("The number of rows a table must contain to stream results rather than pull "
                       + "all into memory during snapshots. Defaults to 1,000. Use 0 to stream all results "
                       + "and completely avoid checking the size of each table.")
    .withDefault(1_000)
    .withValidation(Field::isNonNegativeLong);

  public static final Field BUFFER_SIZE_FOR_BINLOG_READER = Field.create("binlog.buffer.size")
    .withDisplayName("Binlog reader buffer size")
    .withType(Type.INT)
    .withWidth(Width.MEDIUM)
    .withImportance(Importance.MEDIUM)
    .withDescription("The size of a look-ahead buffer used by the  binlog reader to decide whether "
                       + "the transaction in progress is going to be committed or rolled back. "
                       + "Use 0 to disable look-ahead buffering. "
                       + "Defaults to " + DEFAULT_BINLOG_BUFFER_SIZE + " (i.e. buffering is disabled).")
    .withDefault(DEFAULT_BINLOG_BUFFER_SIZE)
    .withValidation(Field::isNonNegativeInteger);

  /**
   * The database history class is hidden in the {@link #configDef()} since that is designed to work with a user
   * interface, and in these situations using Kafka is the only way to go.
   */
  public static final Field DATABASE_HISTORY = Field.create("database.history")
    .withDisplayName("Database history class")
    .withType(Type.CLASS)
    .withWidth(Width.LONG)
    .withImportance(Importance.LOW)
    .withInvisibleRecommender()
    .withDescription("The name of the DatabaseHistory class that should be used to store and recover database schema " +
                       "changes. "
                       + "The configuration properties for the history are prefixed with the '"
                       + DatabaseHistory.CONFIGURATION_FIELD_PREFIX_STRING + "' string.")
    .withDefault(KafkaDatabaseHistory.class.getName());

  public static final Field INCLUDE_SQL_QUERY = Field.create("include.query")
    .withDisplayName("Include original SQL query with in change events")
    .withType(Type.BOOLEAN)
    .withWidth(Width.SHORT)
    .withImportance(Importance.MEDIUM)
    .withDescription("Whether the connector should include the original SQL query that generated the change event. "
                       + "Note: This option requires MySQL be configured with the binlog_rows_query_log_events " +
                       "option set to ON. Query will not be present for events generated from snapshot. "
                       + "WARNING: Enabling this option may expose tables or fields explicitly blacklisted or masked " +
                       "by including the original SQL statement in the change event. "
                       + "For this reason the default value is 'false'.")
    .withDefault(false);

  public static final Field SNAPSHOT_MODE = Field.create("snapshot.mode")
    .withDisplayName("Snapshot mode")
    .withEnum(SnapshotMode.class, SnapshotMode.INITIAL)
    .withWidth(Width.SHORT)
    .withImportance(Importance.LOW)
    .withDescription("The criteria for running a snapshot upon startup of the connector. "
                       + "Options include: "
                       + "'when_needed' to specify that the connector run a snapshot upon startup whenever it " +
                       "deems it necessary; "
                       + "'schema_only' to only take a snapshot of the schema (table structures) but no actual data; "
                       + "'initial' (the default) to specify the connector can run a snapshot only when no offsets" +
                       " are available for the logical server name; "
                       + "'initial_only' same as 'initial' except the connector should stop after completing the " +
                       "snapshot and before it would normally read the binlog; and"
                       + "'never' to specify the connector should never run a snapshot and that upon first startup" +
                       " the connector should read from the beginning of the binlog. "
                       + "The 'never' mode should be used with care, and only when the binlog is known to contain" +
                       " all history.");

  public static final Field SNAPSHOT_LOCKING_MODE = Field.create("snapshot.locking.mode")
    .withDisplayName("Snapshot locking mode")
    .withEnum(SnapshotLockingMode.class, SnapshotLockingMode.MINIMAL)
    .withWidth(Width.SHORT)
    .withImportance(Importance.LOW)
    .withDescription("Controls how long the connector holds onto the global read lock while it is performing a " +
                       "snapshot. The default is 'minimal', "
                       + "which means the connector holds the global read lock (and thus prevents any updates) for " +
                       "just the initial portion of the snapshot "
                       + "while the database schemas and other metadata are being read. The remaining work in a " +
                       "snapshot involves selecting all rows from "
                       + "each table, and this can be done using the snapshot process' REPEATABLE READ transaction " +
                       "even when the lock is no longer held and "
                       + "other operations are updating the database. However, in some cases it may be desirable " +
                       "to block all writes for the entire duration "
                       + "of the snapshot; in such cases set this property to 'extended'. Using a value of 'none'" +
                       " will prevent the connector from acquiring any "
                       + "table locks during the snapshot process. This mode can only be used in combination with" +
                       " snapshot.mode values of 'schema_only' or "
                       + "'schema_only_recovery' and is only safe to use if no schema changes are happening while " +
                       "the snapshot is taken.")
    .withValidation(MySqlConnectorConfig::validateSnapshotLockingMode);

  public static final Field SNAPSHOT_NEW_TABLES = Field.create("snapshot.new.tables")
    .withDisplayName("Snapshot newly added tables")
    .withEnum(SnapshotNewTables.class, SnapshotNewTables.OFF)
    .withWidth(Width.SHORT)
    .withImportance(Importance.LOW)
    .withDescription("BETA FEATURE: On connector restart, the connector will check if there have been any new tables" +
                       " added to the configuration, "
                       + "and snapshot them. There is presently only two options:"
                       + "'off': Default behavior. Do not snapshot new tables."
                       + "'parallel': The snapshot of the new tables will occur in parallel to the continued binlog" +
                       " reading of the old tables. When the snapshot "
                       + "completes, an independent binlog reader will begin reading the events for the new tables" +
                       " until it catches up to present time. At this "
                       + "point, both old and new binlog readers will be momentarily halted and new binlog reader" +
                       " will start that will read the binlog for all "
                       + "configured tables. The parallel binlog reader will have a configured server id of " +
                       "10000 + the primary binlog reader's server id.");

  public static final Field TIME_PRECISION_MODE = RelationalDatabaseConnectorConfig.TIME_PRECISION_MODE
    .withEnum(TemporalPrecisionMode.class, TemporalPrecisionMode.ADAPTIVE_TIME_MICROSECONDS)
    .withValidation(MySqlConnectorConfig::validateTimePrecisionMode)
    .withDescription("Time, date and timestamps can be represented with different kinds of precisions, including:"
                       + "'adaptive_time_microseconds': the precision of date and timestamp values is based the " +
                       "database column's precision; but time fields always use microseconds precision;"
                       + "'connect': always represents time, date and timestamp values using Kafka Connect's " +
                       "built-in representations for Time, Date, and Timestamp, "
                       + "which uses millisecond precision regardless of the database columns' precision.");

  public static final Field BIGINT_UNSIGNED_HANDLING_MODE = Field.create("bigint.unsigned.handling.mode")
    .withDisplayName("BIGINT UNSIGNED Handling")
    .withEnum(BigIntUnsignedHandlingMode.class, BigIntUnsignedHandlingMode.LONG)
    .withWidth(Width.SHORT)
    .withImportance(Importance.MEDIUM)
    .withDescription("Specify how BIGINT UNSIGNED columns should be represented in change events, including:"
                       + "'precise' uses java.math.BigDecimal to represent values, which are encoded in the change" +
                       " events using a binary representation and Kafka Connect's " +
                       "'org.apache.kafka.connect.data.Decimal' type; "
                       + "'long' (the default) represents values using Java's 'long', which may not offer the" +
                       " precision but will be far easier to use in consumers.");

  public static final Field EVENT_DESERIALIZATION_FAILURE_HANDLING_MODE
    = Field.create("event.deserialization.failure.handling.mode")
    .withDisplayName("Event deserialization failure handling")
    .withEnum(EventProcessingFailureHandlingMode.class, EventProcessingFailureHandlingMode.FAIL)
    .withValidation(MySqlConnectorConfig::validateEventDeserializationFailureHandlingModeNotSet)
    .withWidth(Width.SHORT)
    .withImportance(Importance.MEDIUM)
    .withDescription("Specify how failures during deserialization of binlog events (i.e. when encountering a" +
                       " corrupted event) should be handled, including:"
                       + "'fail' (the default) an exception indicating the problematic event and its binlog" +
                       " position is raised, causing the connector to be stopped; "
                       + "'warn' the problematic event and its binlog position will be logged and the event" +
                       " will be skipped;"
                       + "'ignore' the problematic event will be skipped.");

  public static final Field INCONSISTENT_SCHEMA_HANDLING_MODE = Field.create("inconsistent.schema.handling.mode")
    .withDisplayName("Inconsistent schema failure handling")
    .withEnum(EventProcessingFailureHandlingMode.class, EventProcessingFailureHandlingMode.FAIL)
    .withValidation(MySqlConnectorConfig::validateInconsistentSchemaHandlingModeNotIgnore)
    .withWidth(Width.SHORT)
    .withImportance(Importance.MEDIUM)
    .withDescription(
      "Specify how binlog events that belong to a table missing from internal schema representation (i.e. internal" +
        " representation is not consistent with database) should be handled, including:"
        + "'fail' (the default) an exception indicating the problematic event and its binlog position is raised," +
        " causing the connector to be stopped; "
        + "'warn' the problematic event and its binlog position will be logged and the event will be skipped;"
        + "'skip' the problematic event will be skipped.");

  public static final Field ENABLE_TIME_ADJUSTER = Field.create("enable.time.adjuster")
    .withDisplayName("Enable Time Adjuster")
    .withType(Type.BOOLEAN)
    .withDefault(true)
    .withWidth(Width.SHORT)
    .withImportance(Importance.LOW)
    .withDescription(
      "MySQL allows user to insert year value as either 2-digit or 4-digit. In case of two digit the value is" +
        " automatically mapped into 1970 - 2069." +
        "false - delegates the implicit conversion to the database" +
        "true - (the default) Debezium makes the conversion");

  /**
   * The set of {@link Field}s defined as part of this configuration.
   */
  public static Field.Set ALL_FIELDS = Field.setOf(USER, PASSWORD, HOSTNAME, PORT, ON_CONNECT_STATEMENTS, SERVER_ID,
                                                   SERVER_ID_OFFSET,
                                                   SERVER_NAME,
                                                   CONNECTION_TIMEOUT_MS, KEEP_ALIVE, KEEP_ALIVE_INTERVAL_MS,
                                                   CommonConnectorConfig.MAX_QUEUE_SIZE,
                                                   CommonConnectorConfig.MAX_BATCH_SIZE,
                                                   CommonConnectorConfig.POLL_INTERVAL_MS,
                                                   BUFFER_SIZE_FOR_BINLOG_READER, Heartbeat.HEARTBEAT_INTERVAL,
                                                   Heartbeat.HEARTBEAT_TOPICS_PREFIX, DATABASE_HISTORY,
                                                   INCLUDE_SCHEMA_CHANGES, INCLUDE_SQL_QUERY,
                                                   TABLE_WHITELIST, TABLE_INCLUDE_LIST, TABLE_BLACKLIST,
                                                   TABLE_EXCLUDE_LIST, TABLES_IGNORE_BUILTIN,
                                                   DATABASE_WHITELIST, DATABASE_INCLUDE_LIST, DATABASE_BLACKLIST,
                                                   DATABASE_EXCLUDE_LIST,
                                                   COLUMN_BLACKLIST, COLUMN_EXCLUDE_LIST, COLUMN_INCLUDE_LIST,
                                                   MSG_KEY_COLUMNS,
                                                   RelationalDatabaseConnectorConfig.MASK_COLUMN_WITH_HASH,
                                                   RelationalDatabaseConnectorConfig.MASK_COLUMN,
                                                   RelationalDatabaseConnectorConfig.TRUNCATE_COLUMN,
                                                   SNAPSHOT_MODE, SNAPSHOT_NEW_TABLES, SNAPSHOT_LOCKING_MODE,
                                                   RelationalDatabaseConnectorConfig
                                                     .SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE,
                                                   GTID_SOURCE_INCLUDES, GTID_SOURCE_EXCLUDES,
                                                   GTID_SOURCE_FILTER_DML_EVENTS,
                                                   GTID_NEW_CHANNEL_POSITION,
                                                   TIME_PRECISION_MODE, DECIMAL_HANDLING_MODE,
                                                   SSL_MODE, SSL_KEYSTORE, SSL_KEYSTORE_PASSWORD,
                                                   SSL_TRUSTSTORE, SSL_TRUSTSTORE_PASSWORD, JDBC_DRIVER,
                                                   BIGINT_UNSIGNED_HANDLING_MODE,
                                                   EVENT_DESERIALIZATION_FAILURE_HANDLING_MODE,
                                                   CommonConnectorConfig.EVENT_PROCESSING_FAILURE_HANDLING_MODE,
                                                   INCONSISTENT_SCHEMA_HANDLING_MODE,
                                                   CommonConnectorConfig.SNAPSHOT_DELAY_MS,
                                                   CommonConnectorConfig.SNAPSHOT_FETCH_SIZE,
                                                   CommonConnectorConfig.TOMBSTONES_ON_DELETE, ENABLE_TIME_ADJUSTER,
                                                   CommonConnectorConfig.SOURCE_STRUCT_MAKER_VERSION,
                                                   CommonConnectorConfig.SKIPPED_OPERATIONS,
                                                   BINARY_HANDLING_MODE);

  /**
   * The set of {@link Field}s that are included in the {@link #configDef() configuration definition}. This includes
   * all fields defined in this class (though some are always invisible since they are not to be exposed to the user
   * interface) plus several that are specific to the {@link KafkaDatabaseHistory} class, since history is always
   * stored in Kafka when run via the user interface.
   */
  protected static Field.Set EXPOSED_FIELDS = ALL_FIELDS.with(KafkaDatabaseHistory.BOOTSTRAP_SERVERS,
                                                              KafkaDatabaseHistory.TOPIC,
                                                              KafkaDatabaseHistory.RECOVERY_POLL_ATTEMPTS,
                                                              KafkaDatabaseHistory.RECOVERY_POLL_INTERVAL_MS,
                                                              DatabaseHistory.SKIP_UNPARSEABLE_DDL_STATEMENTS,
                                                              DatabaseHistory.STORE_ONLY_MONITORED_TABLES_DDL,
                                                              DatabaseHistory.DDL_FILTER);

  private final SnapshotLockingMode snapshotLockingMode;
  private final GtidNewChannelPosition gitIdNewChannelPosition;
  private final SnapshotNewTables snapshotNewTables;
  private final TemporalPrecisionMode temporalPrecisionMode;
  private final Duration connectionTimeout;

  public MySqlConnectorConfig(Configuration config) {
    super(
      config,
      config.getString(SERVER_NAME),
      null, // TODO whitelist handling is still done locally here
      null,
      DEFAULT_SNAPSHOT_FETCH_SIZE);

    this.temporalPrecisionMode = TemporalPrecisionMode.parse(config.getString(TIME_PRECISION_MODE));
    this.snapshotLockingMode = SnapshotLockingMode.parse(config.getString(SNAPSHOT_LOCKING_MODE),
                                                         SNAPSHOT_LOCKING_MODE.defaultValueAsString());

    String gitIdNewChannelPosition = config.getString(MySqlConnectorConfig.GTID_NEW_CHANNEL_POSITION);
    this.gitIdNewChannelPosition
      = GtidNewChannelPosition.parse(gitIdNewChannelPosition,
                                     MySqlConnectorConfig.GTID_NEW_CHANNEL_POSITION.defaultValueAsString());

    String snapshotNewTables = config.getString(MySqlConnectorConfig.SNAPSHOT_NEW_TABLES);
    this.snapshotNewTables = SnapshotNewTables.parse(snapshotNewTables,
                                                     MySqlConnectorConfig.SNAPSHOT_NEW_TABLES.defaultValueAsString());

    this.connectionTimeout = Duration.ofMillis(config.getLong(MySqlConnectorConfig.CONNECTION_TIMEOUT_MS));
  }

  public SnapshotLockingMode getSnapshotLockingMode() {
    return this.snapshotLockingMode;
  }

  public GtidNewChannelPosition gtidNewChannelPosition() {
    return gitIdNewChannelPosition;
  }

  public SnapshotNewTables getSnapshotNewTables() {
    return snapshotNewTables;
  }

  protected static ConfigDef configDef() {
    ConfigDef config = new ConfigDef();
    Field.group(config, "MySQL", HOSTNAME, PORT, USER, PASSWORD, ON_CONNECT_STATEMENTS, SERVER_NAME, SERVER_ID,
                SERVER_ID_OFFSET,
                SSL_MODE, SSL_KEYSTORE, SSL_KEYSTORE_PASSWORD, SSL_TRUSTSTORE, SSL_TRUSTSTORE_PASSWORD, JDBC_DRIVER,
                CommonConnectorConfig.SKIPPED_OPERATIONS);
    Field.group(config, "History Storage", KafkaDatabaseHistory.BOOTSTRAP_SERVERS,
                KafkaDatabaseHistory.TOPIC, KafkaDatabaseHistory.RECOVERY_POLL_ATTEMPTS,
                KafkaDatabaseHistory.RECOVERY_POLL_INTERVAL_MS, DATABASE_HISTORY,
                DatabaseHistory.SKIP_UNPARSEABLE_DDL_STATEMENTS, DatabaseHistory.DDL_FILTER,
                DatabaseHistory.STORE_ONLY_MONITORED_TABLES_DDL);
    Field.group(config, "Events", INCLUDE_SCHEMA_CHANGES, INCLUDE_SQL_QUERY, TABLES_IGNORE_BUILTIN,
                DATABASE_WHITELIST, DATABASE_INCLUDE_LIST, TABLE_WHITELIST, TABLE_INCLUDE_LIST,
                COLUMN_BLACKLIST, COLUMN_EXCLUDE_LIST, COLUMN_INCLUDE_LIST, TABLE_BLACKLIST, TABLE_EXCLUDE_LIST,
                DATABASE_BLACKLIST, DATABASE_EXCLUDE_LIST, MSG_KEY_COLUMNS,
                RelationalDatabaseConnectorConfig.MASK_COLUMN_WITH_HASH,
                RelationalDatabaseConnectorConfig.MASK_COLUMN,
                RelationalDatabaseConnectorConfig.TRUNCATE_COLUMN,
                RelationalDatabaseConnectorConfig.SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE,
                GTID_SOURCE_INCLUDES, GTID_SOURCE_EXCLUDES, GTID_SOURCE_FILTER_DML_EVENTS, GTID_NEW_CHANNEL_POSITION,
                BUFFER_SIZE_FOR_BINLOG_READER,
                Heartbeat.HEARTBEAT_INTERVAL, Heartbeat.HEARTBEAT_TOPICS_PREFIX,
                EVENT_DESERIALIZATION_FAILURE_HANDLING_MODE,
                CommonConnectorConfig.EVENT_PROCESSING_FAILURE_HANDLING_MODE, INCONSISTENT_SCHEMA_HANDLING_MODE,
                CommonConnectorConfig.TOMBSTONES_ON_DELETE, CommonConnectorConfig.SOURCE_STRUCT_MAKER_VERSION);
    Field.group(config, "Connector", CONNECTION_TIMEOUT_MS, KEEP_ALIVE, KEEP_ALIVE_INTERVAL_MS,
                CommonConnectorConfig.MAX_QUEUE_SIZE,
                CommonConnectorConfig.MAX_BATCH_SIZE, CommonConnectorConfig.POLL_INTERVAL_MS,
                SNAPSHOT_MODE, SNAPSHOT_LOCKING_MODE, SNAPSHOT_NEW_TABLES, TIME_PRECISION_MODE, DECIMAL_HANDLING_MODE,
                BIGINT_UNSIGNED_HANDLING_MODE, SNAPSHOT_DELAY_MS, SNAPSHOT_FETCH_SIZE, ENABLE_TIME_ADJUSTER,
                BINARY_HANDLING_MODE);
    return config;
  }

  private static int validateGtidNewChannelPositionNotSet(Configuration config, Field field,
                                                          ValidationOutput problems) {
    if (config.getString(GTID_NEW_CHANNEL_POSITION.name()) != null) {
      LOGGER.warn("Configuration option '{}' is deprecated and scheduled for removal",
                  GTID_NEW_CHANNEL_POSITION.name());
    }
    return 0;
  }

  private static int validateEventDeserializationFailureHandlingModeNotSet(Configuration config, Field field,
                                                                           ValidationOutput problems) {
    final String modeName = config.asMap().get(EVENT_DESERIALIZATION_FAILURE_HANDLING_MODE.name());
    if (modeName != null) {
      LOGGER.warn("Configuration option '{}' is renamed to '{}'", EVENT_DESERIALIZATION_FAILURE_HANDLING_MODE.name(),
                  EVENT_PROCESSING_FAILURE_HANDLING_MODE.name());
      if (EventProcessingFailureHandlingMode.OBSOLETE_NAME_FOR_SKIP_FAILURE_HANDLING.equals(modeName)) {
        LOGGER.warn("Value '{}' of configuration option '{}' is deprecated and should be replaced with '{}'",
                    EventProcessingFailureHandlingMode.OBSOLETE_NAME_FOR_SKIP_FAILURE_HANDLING,
                    EVENT_DESERIALIZATION_FAILURE_HANDLING_MODE.name(),
                    EventProcessingFailureHandlingMode.SKIP.getValue());
      }
    }
    return 0;
  }

  private static int validateInconsistentSchemaHandlingModeNotIgnore(Configuration config, Field field,
                                                                     ValidationOutput problems) {
    final String modeName = config.getString(INCONSISTENT_SCHEMA_HANDLING_MODE);
    if (EventProcessingFailureHandlingMode.OBSOLETE_NAME_FOR_SKIP_FAILURE_HANDLING.equals(modeName)) {
      LOGGER.warn("Value '{}' of configuration option '{}' is deprecated and should be replaced with '{}'",
                  EventProcessingFailureHandlingMode.OBSOLETE_NAME_FOR_SKIP_FAILURE_HANDLING,
                  INCONSISTENT_SCHEMA_HANDLING_MODE.name(),
                  EventProcessingFailureHandlingMode.SKIP.getValue());
    }
    return 0;
  }

  private static int validateDatabaseExcludeList(Configuration config, Field field, ValidationOutput problems) {
    String includeList = config.getFallbackStringProperty(DATABASE_INCLUDE_LIST, DATABASE_WHITELIST);
    String excludeList = config.getFallbackStringProperty(DATABASE_EXCLUDE_LIST, DATABASE_BLACKLIST);
    if (includeList != null && excludeList != null) {
      problems.accept(DATABASE_EXCLUDE_LIST, excludeList, DATABASE_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG);
      return 1;
    }
    return 0;
  }

  private static int validateGtidSetExcludes(Configuration config, Field field, ValidationOutput problems) {
    String includes = config.getString(GTID_SOURCE_INCLUDES);
    String excludes = config.getString(GTID_SOURCE_EXCLUDES);
    if (includes != null && excludes != null) {
      problems.accept(GTID_SOURCE_EXCLUDES, excludes, "Included GTID source UUIDs are already specified");
      return 1;
    }
    return 0;
  }

  /**
   * Validate the new snapshot.locking.mode configuration, which replaces snapshot.minimal.locking.
   *
   * If minimal.locking is explicitly defined and locking.mode is NOT explicitly defined:
   *   - coerce minimal.locking into the new snap.locking.mode property.
   *
   * If minimal.locking is NOT explicitly defined and locking.mode IS explicitly defined:
   *   - use new locking.mode property.
   *
   * If BOTH minimal.locking and locking.mode ARE defined:
   *   - Throw a validation error.
   */
  private static int validateSnapshotLockingMode(Configuration config, Field field, ValidationOutput problems) {
    // Determine which configurations are explicitly defined
    if (config.hasKey(SNAPSHOT_LOCKING_MODE.name())) {
      final SnapshotLockingMode lockingModeValue = SnapshotLockingMode.parse(
        config.getString(MySqlConnectorConfig.SNAPSHOT_LOCKING_MODE));
      // Sanity check, validate the configured value is a valid option.
      if (lockingModeValue == null) {
        problems.accept(SNAPSHOT_LOCKING_MODE, lockingModeValue, "Must be a valid snapshot.locking.mode value");
        return 1;
      }
    }

    // Everything checks out ok.
    return 0;
  }

  /**
   * Validate the time.precision.mode configuration.
   *
   * If {@code adaptive} is specified, this option has the potential to cause overflow which is why the
   * option was deprecated and no longer supported for this connector.
   */
  private static int validateTimePrecisionMode(Configuration config, Field field, ValidationOutput problems) {
    if (config.hasKey(TIME_PRECISION_MODE.name())) {
      final String timePrecisionMode = config.getString(TIME_PRECISION_MODE.name());
      if (TemporalPrecisionMode.ADAPTIVE.getValue().equals(timePrecisionMode)) {
        // this is a problem
        problems.accept(TIME_PRECISION_MODE, timePrecisionMode, "The 'adaptive' time.precision.mode is no " +
          "longer supported");
        return 1;
      }
    }

    // Everything checks out ok.
    return 0;
  }

  private static int randomServerId() {
    int lowestServerId = 5400;
    int highestServerId = 6400;
    return lowestServerId + new Random().nextInt(highestServerId - lowestServerId);
  }

  @Override
  protected SourceInfoStructMaker<? extends AbstractSourceInfo> getSourceInfoStructMaker(Version version) {
    switch (version) {
      case V1:
        return new LegacyV1MySqlSourceInfoStructMaker(Module.name(), Module.version(), this);
      default:
        return new MySqlSourceInfoStructMaker(Module.name(), Module.version(), this);
    }
  }

  @Override
  public String getContextName() {
    return Module.contextName();
  }

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

  @Override
  public TemporalPrecisionMode getTemporalPrecisionMode() {
    return temporalPrecisionMode;
  }

  public Duration getConnectionTimeout() {
    return connectionTimeout;
  }
}


We can help you decide whether composite resin fillings are right for you. To request an appointment, contact Dental Care Group.
There is no such thing as a one-size-fits-all treatment, so we never use a one-size-fits-all approach to your dental plan.
We proudly serve Prairieville, Gonzales, Baton Rouge, Port Vincent, Dutchtown and other surrounding areas.
70769 Dentist | Can You Inherit Oral Health Issues?


text:
Q: Get correct static urls with cherrypy dispatching of flask apps I'm trying to use cherrypy for application dispatching with Flask. The docs give an example with a development server, but when using the cherrypy example snippet and modifying the url prefix, the page is unable to find the static folder.
My directory structure is as follows:
cherry
├── app1
│   ├── __init__.py
│   └── app1.py
├── app2
│   ├── __init__.py
│   ├── app2.py
│   ├── static
│   │   └── js.js
│   └── templates
│       └── index.html
└── cherry_app.py

Some relevant files:
##  cherry_app.py
from cherrypy import wsgiserver
from app1.app1 import app as app1
from app2.app2 import app as app2

d = wsgiserver.WSGIPathInfoDispatcher({'/first': app1,
                                       '/second': app2,
                                       })

server = wsgiserver.CherryPyWSGIServer(('0.0.0.0', 9999), d)

if __name__ == '__main__':
    try:
        print 'Start at 0.0.0.0:9999'
        server.start()
    except KeyboardInterrupt:
        server.stop()

##  app2.py
from flask import Flask, send_file
import flask

app = Flask(__name__)
@app.route("/")
def root():
    return ("Hello World!\nThis is the second app. Url is %s"
            % flask.url_for('root'))

@app.route("/index")
def index():
    return send_file('templates/index.html')

if __name__ == "__main__":
    app.run()

##  index.html
<script src="/static/js.js"></script>

JS loaded?

##  js.js
alert('Loaded!');

Going to http://0.0.0.0:9999/second/ correctly tells me that the Url is /second/, and the javascript is loaded when I go to http://0.0.0.0:9999/second/static/js.js. But the html gives the error GET http://0.0.0.0:9999/static/js.js 404 (Not Found). It appears it doesn't know to use the prefix /second when looking for /static even when I change the line:
app = Flask(__name__, static_url_path='/second/static')

How can I get the webpage to correctly load the static files? Preferrably without html templating (like jinja).

A: Did you try to use url_for to locate static files? Here is the static files section in Flask quickstart.
So in your situation, modify src value of script element in index.html:
<script src="{{ url_for("static", "js.js") }}"></script>

The second argument js.js should be the relative path of static file (say js.js) to the static folder. So if the directory structure of static looks like:
static/scripts/js.js

just replace js.js with scripts/js.js:
<script src="{{ url_for("static", "scripts/js.js") }}"></script>

Hope this will make sense.

redpajama_set_name: RedPajamaStackExchange


My central argument of this article is that creationism is best seen by a science teacher not as a misconception but as a worldview. The implication of this is that the most a science teacher can normally aspire to is to ensure that students with creationist beliefs understand the scientific position. In the short term, this scientific worldview is unlikely to supplant a creationist one.
The [UK Schools] Guidance points out that the nature of, and evidence for, evolution must be taught … It then goes on to say: "Creationism and intelligent design are not part of the science National Curriculum programmes of study and should not be taught as science. However, there is a real difference between teaching 'x' and teaching about 'x'. Any questions about creationism and intelligent design which arise in science lessons, for example as a result of media coverage, could provide the opportunity to explain or explore why they are not considered to be scientific theories and, in the right context, why evolution is considered to be a scientific theory".
This seems to me a key point. Many scientists, and some science educators, fear that consideration of creationism or intelligent design in a science classroom legitimises them. For example, the excellent book Science, Evolution, and Creationism published by the US National Academy of Sciences and Institute of Medicine asserts "The ideas offered by intelligent design creationists are not the products of scientific reasoning. Discussing these ideas in science classes would not be appropriate given their lack of scientific support".
I agree with the first sentence but disagree with the second. Just because something lacks scientific support doesn't seem to me a sufficient reason to omit it from a science lesson. When I was taught physics at school, and taught it extremely well in my view, what I remember finding so exciting was that we could discuss almost anything providing we were prepared to defend our thinking in a way that admitted objective evidence and logical argument.
When teaching evolution, there is much to be said for allowing students to raise any doubts they have (hardly a revolutionary idea in science teaching) and doing one's best to have a genuine discussion. The word 'genuine' doesn't mean that creationism or intelligent design deserve equal time. However, in certain classes, depending on the comfort of the teacher in dealing with such issues and the make up of the student body, it can be appropriate to deal with the issue.
A student who believes in creationism can be seen as inhabiting a non-scientific worldview, that is a very different way of seeing the world. One very rarely changes one's worldview as a result of a 50 minute lesson, however well taught.
The lengthy quote is necessary to avoid caricaturing Prof. Reiss' position. The press jumped on the story with headlines like "Leading scientist urges teaching of creationism in schools – Creationism should be taught in science classes as a legitimate point of view" (The Times), which is precisely what Prof. Reiss didn't say, as the above quotes demonstrate.
'The extreme rarity of transitional forms in the fossil record persists as the trade secret of paleontology. … to preserve our favored account of evolution by natural selection we view our data as so bad that we never see the very process we profess to study.
He will point out that the peppered moths in the famous textbook photograph were dead, held on the tree by glue. Behind these arguments will be the firm belief that evolution is atheism in disguise.
What should the teacher do at this point? Like it or not, a debate has been started, and to simply ignore the debate is to lose. Reiss' point is simple: creationism will end up in the science classroom because students will bring it there. The teacher's first, and probably only realistic goal is to ensure that the student actually understands the theory of and evidence for evolution, and not the straw-men that some creationists put forward.
The Royal Society, by effectively firing Reiss (I don't believe for a second that he offered to resign), has given ammunition to those who accuse evolutionists of staging a conspiracy to silence all opposition, without open debate. And if misrepresentations of Reiss' views "led to damage to the Society's reputation", then the blame should not be laid on Reiss, who made himself very clear.
The way Micheal Reiss was treated is the same way he would be treated by someone defending a view that they know doesn't stand on firm evidence. That doesn't mean evolution is lacking firm evidence, but the attitude and reaction of those against Micheal Reiss does help make the public a little more suspicious about their views.


text:
package org.tensorics.core.math.predicates;

public final class IsEqualTo<T> implements BinaryPredicate<T> {

    private static final IsEqualTo<?> INSTANCE = new IsEqualTo<>();

    @Override
    public Boolean perform(T left, T right) {
        return test(left, right);
    }

    @Override
    public boolean test(T left, T right) {
        return left.equals(right);
    }

    @SuppressWarnings("unchecked")
    public static final <T> IsEqualTo<T> isEqualTo() {
        return (IsEqualTo<T>) INSTANCE;
    }

}

redpajama_set_name: RedPajamaGithub


text:
Кристиан Понде (; 26 января 1995, Копалник-Мэнэнштур, Марамуреш, Румыния) — португальский футболист, нападающий.

Биография
Родился 26 января 1995 года в Румынии. В возрасте 9 лет переехал с родителями в Португалию, где начал заниматься футболом в клубе «Ольяненсе». В 2005 году перешёл в академию лиссабонского «Спортинга». На профессиональном уровне дебютировал в составе фарм-клуба «Спортинга» 24 февраля 2013 года в матче второй португальской лиги против «Фреамунде». 21 января 2015 года игрок дебютировал за основной состав «Спортинга», выйдя на замену на 89-й минуте в матче Кубка португальской лиги против «Белененсиш». Сезон 2016/2017 провёл в аренде в «Спортинг Ковильян».

Ссылки

Футболисты Португалии
Игроки ФК «Спортинг» Лиссабон
Игроки ФК «Спортинг B» Лиссабон
Игроки ФК «Спортинг» Ковильян
Игроки ФК «Карпаты» Львов

redpajama_set_name: RedPajamaWikipedia


With ExChange, the employee experience event, landing in the City of London on May 24th, we sat down with Ruth Dance and Grace Burton, our hosts for the day to learn a little more about what to expect.
Can you both tell us a little bit about yourselves?
Before becoming MD of The Employee Engagement Alliance I spent 12 years working in people development. From running the week-long induction programmes across the European auction houses of Christie's to leading the management development at publishers of The Times, The Sunday Times & The Sun at News UK. I've aligned my passion for people with everything I've done. When I later moved into a people-focussed role reporting into a Customer Experience division everything just 'clicked' and that's where I truly started to understand and see the benefits of concentrating on the experience.
GB: Like Ruth, I'm utterly fascinated by learning why people do what they do. It was Benefex's focus on people which made me want to join them initially, and I jumped at the opportunity to move into a role focused on researching employee experience last year. I've found myself growing more and more interesting in how rapidly we're seeing society adapt and evolve around technology. So I spend most of my days thinking about employee experience, tech or some combination of the two. My nose is usually in a few books at any given time. And if anyone asks – it's research!
GB: At Benefex we're lucky to work with some of the best employers in the world, and we've seen the role of employee experience specialists and entire EX strategies really grow within those organisations. In talking to these people – employee experience managers and directors – they were telling us that they didn't feel like they had a community outside of their organisations so that's what we want to deliver with ExChange; a space for those people making strategic people decisions to really think about what the future holds for them.
There's been a huge shift towards thinking about employee experience, why do you think this is?
RD: Organisations are now starting to see the business results from focusing on the inside first. From re-allocating budgets to their people focus to having clear measurable outcomes internally and externally on engagement and the links to business success. The more we're hearing about these inspiring case studies the more companies are following suit. For me, it's the employee experience that's imperative and the starting point to this cultural shift. Applying learnings that have been demonstrated in customer experience during the last 10 years and translating these to our people is having huge benefits.
GB: I don't think you can really understand the movement towards employee experience without thinking about the broader preference for experience we're now seeing across society. I'm delighted that James Wallman is joining us for ExChange because he's one of the leading voices in this. We're placing access and convenience above ownership in a way that I think is crucial for employers to grasp. Combine this with the consequences of the age of transparency we're now in, and we're finally seeing organisations live and die by the way they treat their people. I hope this doesn't seem scary, because really there's an incredible amount of opportunity for our organisations become workplaces which do the best by their employees – and get the best out of them in return.
RD: Terms such as employee engagement, employee wellbeing, diversity & inclusion, flexible working – the list goes on – will no longer be something we're aiming for but something that's completely expected. We're a long way off that right now however I think with the next generation entering the workplace who are more attuned to their own needs of authenticity, customisation and meaningful connections they're going to be shaping the future sooner than we might be prepared for.
GB: As we live longer and healthier lives, something must change fundamentally about the way we think about work. The concept of a job for life is dead for people in my generation, and I don't think that's as simple as being either a good or a bad thing – but it absolutely comes with a lot of challenges for everyone involved. We're already seeing more people have a much more fluid relationship with work and a different concept of employment. I'm expecting to see everything from workspaces to employee-employer relationships shift entirely during my lifetime.
Which part of ExChange are you most excited about?
RD: The line-up of speakers is nothing short of incredible. I'm particularly excited to hear from the experts on their research, thoughts and opinions on what the workplace is going to look like in the short to medium term and the tangible actions we can to take to not only be prepared but lead the way.
GB: Without meaning to sound like an echo; the calibre of our speakers is exceptional. Having been in the audience at other events they've spoken at, it's going to be such a privilege to bring them to ExChange. I'm also so excited to spend the day in a room full of people who get that there's seismic changes underfoot in the world of work.
RD: I'm spending more and more time on LinkedIn lately. This hasn't been a conscious decision I've made, but with being mum to a toddler and running The EEA, finding my inspiration in small digestible chunks in the form of posts, videos, blogs and articles whilst on the go is really working for me. Although I'll admit – I should probably reduce my screen time.
I've started watching The Assassination of Gianni Versace on BBC. My husband took a bit of convincing to start it but now we're hooked – we tend to binge watch series' and the anticipation of what's coming next each week is exciting!
GB: On my desk at work I've got Hippo by Pete Trainor and the Future of Work by Richard Donkin, and at home I'm reading Why I'm No Longer Talking to White People About Race by Reni Eddo-Lodge which I can't recommend enough. I'm watching Altered Carbon on the recommendation of Matt Macri-Waller, one of our speakers. The concept of digitising our consciousness is fascinating and terrifying in equal measure.
RD: The calendar on my iPhone. Juggling family life, networking events, toddler nursery pick-ups, learning events, international travel, calls and planning time requires a constantly synchronised diary at all times. 'Fail to plan, plan to fail' – and when my phone is out action it certainly feels like crisis!
GB: So with two phones, on my personal phone I keep in touch with my friends through WhatsApp and Snapchat. On my work phone I've become hooked on our OneHub Recognition app, probably because it's really social and I'm fascinated by seeing the thanks and praise that people across our business give each other.
We're busy people – why should we spend the day at ExChange?
RD: Businesses don't just need to survive today but be prepared to thrive in the future. The world is changing, fast.
Research suggests that the big organisations cannot rely on their brand name or great office locations alone to attract the future talent anymore. It's becoming so much deeper than that. The need for authenticity, building trust, having clear purpose driven experiences both on the inside and outside is what's going to stand you apart and help your business to thrive. As a leader of people, investing one day out of your schedules to hear from the world's leading experts on this subject, share with peers and be truly motivated to make a real difference in your business is a small investment to make for a long-term gain.
GB: We'll be bringing a great combination of world-class employers and leading thinkers to not only give you those valuable lessons from other organisations but crucially, an insight into the challenges and opportunities that the future of work holds. It's going to be a day for people who are happy to have their assumptions challenged.
ExChange is a day for the people who design and deliver exceptional employee experiences, and for those who know that the way we work is changing beyond all recognition.


text:
HOME PI Publications Recognition Contact Vacancy Labmembers Images Movies Media Links Hindi-Bengali
Namaste, and welcome to our website. We are trying to understand how very small things move over very small distances inside the cells of the body. Our work spans the traditionally defined disciplines of Biology, Physics, Chemistry and Computation. You can explore our website using the links above. If you want to know why we are excited about what we do, read on below…
Some of the most insightful research in biology has come by applying ideas and tools from the physical sciences on biological systems. Quantitative answers have been obtained through novel techniques, such as those invented to measure function of a single biological molecule (for example, a protein). Such "single molecule" experiments are technically challenging, and are typically done with the molecule placed in an artificial (in vitro) environment. While these experiments are pioneering in their own right, it is often not possible to relate their results to real-world biology. This is because inside a cell (in vivo), there is almost never anything like a "single molecule". Biological molecules usually work as part of a larger complex, where many of them come together to achieve a common function. It is the NET function of this complex that is relevant, and not just that of the single constituent proteins. Our goal is to extend the precision of single-molecule techniques inside living cells, and directly measure function of a protein-complex in real-time in a cellular environment.
The living cell is an assembly of specialized factories with a constant give-and-take of material occurring within them. Nanoscale proteins called Molecular motors (Ref 1,2,3) carry cellular material as "cargo" from one factory to the other (e.g. mRNA, vesicles, endosomes). This transport of material is essential for the cell and its factories to function. A heavy traffic of cargoes of different size and shapes can be observed under the microscope. The motors attach to specific cargo, and walk in a step-like manner on pre-laid tracks inside the cell. In order to walk, the motors generate forces about a million-million times smaller than what we use in our day-to-day life (Ref 4,5). These machines are indeed the unit generator of force for most cellular processes. As with everything in biology, complexity throws up a challenge -- different motors with inclination to walk in different directions are usually present together on a given cargo, along with a host of other non-motor proteins (Ref 6,7). How do these antagonistic motors work (or not work) together??
And, then, there are the lipids on the membrane of the cargo which provide a platform for the motors to assemble before they can generate force (read more). Lipid-motor interactions are therefore likely to be a central determinant in many mechano-biological processes. Very little, however, is known about this aspect of mechanobiology. Our goal is to understand this alliance between force-generating motors and lipids. In this context, we are working on two problems of direct relevance to human health that are described below.
Transport and Degradation of pathogens inside immune cells
Sanghavi et al, Current Biology 2018; Rai et al, Cell 2016 ; Rai et al, Cell 2013 ; Soppina et al, PNAS 2009
We recently demonstrated how cholesterol dictates dynein motor function inside cells during phagosome maturation. The geometrical organization of dynein on a phagosome's lipid membrane was shown to be modified by clustering dynein into cholesterol-rich lipid rafts. This dramatically altered dynein's cooperative function with no apparent effect on it's single molecule properties. These results are relevant to immune evasion by pathogens (e.g. Mycobacterium, Salmonella and Leishmania). Building on this finding, we will try to address how lipids and proteins secreted by pathogens influence the organization of motors on pathogen-containing phagosomes, and if this is relevant to immune evasion by these pathogens. Popular articles on this project:- LINK LINK
What your Liver does when you sleep
Rai et al, PNAS 2017; Sadh et al PLoS ONE 2017; Barak et al Nature Methods 2013
Excess fat circulating around in blood means obesity, diabetes and heart disease. We recently found a mechanism that allows the liver to control fat secretion into blood. When we fast, for example we go to bed after dinner, glucose is in plenty but soon it runs out and the body must burn fat to keep going. Fat-containing tissues respond by sending off fat to the liver, which gets bloated with fat, but still continues to secrete this fat at a constant rate. This remarkable elasticity of the liver prevents dangerous fat overload in the blood. But, how does all this work at the level of cells and molecules? We showed that insulin recruits the motor protein kinesin to fat bodies. Kinesin propels fat to the periphery of liver cells, from where the fat is secreted out. As the night wears on, fat accumulates in the liver, but insulin levels also diminish. Kinesin now falls off from the fat bodies, secretion is toned down and systemic fat homeostasis can be achieved. So, you should probably thank your liver when you get up fresh as a flower tomorrow morning. Popular articles on this project:- LINK
How we do the Research
The obvious, yet most remarkable thing about molecular motors is that they actually move !! This motion can be directly observed under a microscope, and interpreted in terms of the motor's function. We record and analyze this motion, measure the forces generated during motion using optical tweezers, try to identify the molecules driving such motion using protein biochemistry, and also interfere with the motion using genetic/biochemical techniques. We use the microtubule-motor dependent motion of endosomes, phagosomes and lipid droplets as our model systems, and interrogate these systems at multiple levels of complexity:-
− Directly inside living cells.
− Semi in vitro experiments in cell extracts.
− With purified single motor proteins coated on sub-micron plastic beads.
To read more, see Summary of our papers on the Publications page
1. Vale RD: The molecular motor toolbox for intracellular transport. Cell 2003, 112:467-480.
2. Vale RD, Milligan RA: The way things move: looking under the hood of molecular motor proteins. Science 2000, 288:88-95.
3. Schliwa M, Woehlke G: Molecular motors. Nature 2003, 422:759-765.
4. Visscher K, Schnitzer MJ, Block SM: Single kinesin molecules studied with a molecular force clamp. Nature 1999, 400:184-189.
5. Mallik R, Carter BC, Lex SA, King SJ, Gross SP: Cytoplasmic dynein functions as a gear in response to load. Nature 2004, 427:649-652.
6. Mallik R, Gross SP: Molecular motors: strategies to get along. Curr Biol 2004, 14:R971-982.
7. M. Welte. Bidirectional transport along microtubules Current Biology, Vol 14, R525-37 (2004)
8. S.P. Gross. Hither and yon: a review of bi-directional microtubule-based transport Physical Biology, Vol 1, R1-11 (2004)
9. Hirokawa N, Takemura R: Biochemical and molecular characterization of diseases linked to motor proteins. Trends in Biochemical Sciences 2003, 28: 558

redpajama_set_name: RedPajamaCommonCrawl


text:
Minnesota's flag is royal blue with the state seal displayed in the center.
The nineteen stars arranged outside the wreath symbolize the fact that Minnesota was the 19th state to enter the Union. The largest star represents the North Star and Minnesota.
The state motto on the seal is French, "L'étoile du Nord" meaning "the star of the North" (the basis for Minnesota's nickname as "The North Star State").
statesymbolsusa.org
State Election Information
Statewide election dates
August 11, 2020: Primary
November 3, 2020: General election
Offices on the ballot
Below is a list of 2020 Minnesota elections covered by Ballotpedia. Follow the links to learn more about each type.
President of the United States ✓
U.S. Senate ✓
U.S. House ✓
Congress special election —
Governor —
Other state executive —
State Senate ✓
State House ✓
Special state legislative ✓
State Supreme Court ✓
Intermediate appellate courts ✓
Local judges —
School boards ✓
Municipal government ✓
Recalls —
Ballot measures —
Local ballot measures
ballotpedia.org
Toni No Bologny February 26, 2010 at 3:32pm
http://www.facebook.com/event.php?eid=329259423023
Tea Party Movie after the March 2/27 6pm at Kelley Inn
Bob J Criswell January 25, 2010 at 3:32pm
Check out how bias the News Media has been http://www.mrc.org/specialreports/uploads/obamaomit.pdf
Sign the petition to have Scott seated at once. http://www.ipetitions.com/petition/seatscottbrown/
Bob J Criswell January 19, 2010 at 10:08pm
In epic upset, GOP's Brown wins Mass. Senate race
THIS IS HOW WE CAN FIX CONGRESS!!!!!
Send this to virtually everybody on your e-mail list and that includes conservatives, liberals, and everybody in between. This is the proposed "Congressional Reform Act of 2010". It would contain eight provisions, all of which would probably be strongly endorsed by those who drafted the Constitution and the Bill of Rights.
Congress has the lowest approval of any entity in Government, the entity that represents us.
We need to get a Senator to introduce this bill in the US Senate and a Representative to introduce a similar bill in the US House.
These people will become American hero's.. Please send any ideas on how to get this done.
A Fellow American
Congressional Reform Act of 2010
1. Term Limits: 12 years only, one of the possible options below.
A. Two Six year Senate terms
B. Six Two year House terms
C. One Six year Senate term and three Two Year House terms
Serving in Congress is an honor, not a career.
The Founding Fathers envisioned citizen legislators, serve your term(s), then go home and back to work.
2. No Tenure / No Pension:
A congressman collects a salary while in office and receives no pay when they are out of office..
3. Congress (past, present & future) participates in Social Security:
All funds in the Congressional retirement fund moves to the Social Security system immediately. All future funds flow into the Social Security system, Congress participates with the American people.
4. Congress can purchase their own retirement plan just as all Americans.
5. Congress will no longer vote themselves a pay raise. Congressional pay will rise by the lower of CPI or 3%.
6. Congress looses their current health care system and participates in the same health care system as the American people.
7. Congress must equally abide in all laws they impose on the American people.
8. All contracts with past and present congressmen are void effective 1/1/11.
The American people did not make this contract with congressmen, congressmen made all these contracts for themselves.
Tea Party Founder January 17, 2010 at 10:30am
Bob - Thanks for this info. I agree the Union members need to standup for America, even if their Union Bosses don't.
Bob J Criswell January 17, 2010 at 10:29am
What Sarah Said: Fri at 9:45am
Union Brothers and Sisters:
Your Leadership Doesn't Get It – You Deserve Better
In the latest to come out of D.C.'s backroom health care deals, President Obama yesterday cut a doozy of a deal with labor union bosses. The fed's health care plan must be so bad that even union bosses had to go to D.C. to say they wanted out. So... to keep their support for a flawed plan they got an exemption to provisions in the deal that others did not. Small business owners, our families running America's mom & pops, did not get this deal. Ask yourself: why did union bosses get special treatment? And when did our country's unions get on the wrong track with moves like this that hurt their good members and put them in such a bad light?
Good hard-working, pro-free-market, pro-America union members should join in opposition to their union bosses' sweetheart deal. Coming from a union background and living in a world with many union memberships among my family and friends, I know that average members will be embarrassed by their bosses' deal, which basically only delays the heavy tax on their health care plans until 2018 and in the meantime unfairly leaves many fellow Americans in a much less "enviable" position.
Union members don't want to stick it to non-union colleagues in the private and public sector. Their union leadership is not helping them in the long run, they're certainly not helping the rest of America, and unfortunately some union bosses are making all union members look bad, selfish, and anti-business with this Big Government backroom deal.
I know that ordinary union members don't want to hurt their fellow Americans, just as ordinary Nebraskans didn't want to stick it to the rest of the country with a sweetheart deal on Medicaid subsidies. I urge union members to make their voices heard. Please, call your leadership – don't put up with these special-interest politics – tell them to fight for all Americans who want common sense health care reform, not this flawed boondoggle.
- Sarah Palin
Bob J Criswell January 3, 2010 at 3:10pm
Victory or Death the secret password of George Washington, we all must make this our agenda as well.
https://www.youtube.com/watch?v=qtjfMjjce2Y
of 3 Next
COVID19 RE-OPEN MINNESOTA
Looking for people that want to Re-Open Minnesota.
Started by SallySmasher
protecting illegals
this is such a bunch of crap...now they are protecting illegals from the law... I am going to get a protest going at the state capital about this...this is soooooo wrong and I as an american am not going to take this....they are punishing americans and giving our tax dollars to the illegals and our jobs and now they are giving them rights that they shouldnt have in our own country...and what about the americans over sea's fighting in iraq and afgan what are they going to do for jobs when they…
Started by MARK ALAN OLSON
REMOCE TE MOSQUE IN THE CAPITAL BUILDING
Your infidel taxpayer dollars at work! The dome on Capitol Hill will be gilded in no short order. Where is the separation of mosque and state? Head slap! There s no separation. Mosque is state. (hat tip Creeping Sharia)The Congressional Muslim Staffers (CMSA) – a group we told you about numerous times now (read previous posts here), and their leader Jihad. Well, he chose the name Jihad it always seems to be abbreviated to J. when the media is around.Folks – this is the United States Capitol…
Started by 3ozt6gobts7m9
Mohammad (Keith Maurice Ellison) -Home Grown Terrorist in Congress
http://en.wikipedia.org/wiki/Keith_Ellison_(politician)Shariah Law was placed in the Obama care bill by him stating Muslims do not have to pay this tax because health insurance is considered gambling therefor Muslims are exempt from payingKeith Maurice Ellison (born August 4, 1963) is the U.S. Representative for Minnesota's 5th congressional district, serving since 2007. He is a member of the Democratic-Farmer-Labor Party. The district centers on Minneapolis.He became the first Muslim[1][2] to…


text:
Do credit scores punish you for not carrying debt?
Trying to boost your credit score by taking out an installment loan may not be worth the effort and expense.
(Elise Amendola / Associated Press)
By Liz Weston
July 29, 2018 3 AM PT
Dear Liz: I am fortunate to be able to afford homeownership without having to obtain a mortgage. The same is true of owning cars without a car loan. I pay my credit card bills in full each month. In short, I do not carry any debt.
However, it seems to me that I am being "punished" by not carrying a load of debt. My credit score is reduced by this lack of debt and I am wondering why this is.
Answer: The most commonly used credit scores don't "know" if you're carrying credit card debt or not. The balances used in credit score calculations are the balances the card issuers report to the bureaus on a given day (often your statement balances). You could pay the balance off the next day, or carry it for the next month, and it would have no impact on your scores.
A small part of credit scoring formulas measure your mix of credit, or whether you have both revolving accounts (such as credit cards) and installment loans (mortgages, car loans, student loans, etc.) You may get higher scores if you added an installment loan to your mix. If your scores are low, it can be worth adding a small personal loan to boost them. If your scores are good, though, it may not be worth the effort and interest expense.
Social Security spousal benefits
Dear Liz: In a recent article, you mentioned spousal benefits. If someone started her own Social Security benefit at 62, is there no way of drawing a spousal benefit at a later date?
Answer: When you apply for Social Security now, you're "deemed" (considered by the Social Security Administration) to be applying for both your own benefit and any available spousal benefit. If a spousal benefit is larger, you'll get that, and you can't switch back to your own benefit later.
You may be able to switch from your own benefit to a spousal benefit, however. Let's say that when you applied at 62, your spouse had not yet applied for his or her own benefit. When he or she does apply, you'll be automatically switched to a spousal benefit if it's larger than your own.
Before Congress changed the rules, it was possible for one spouse to "file and suspend" — file and immediately suspend an application for retirement benefits, which was enough to allow a spouse to collect a spousal benefit. Today, a spousal benefit is typically only available if the primary earner has started his or her own retirement benefits.
The fat in your genes/jeans
Dear Liz: In one of your recent answers, you said "avoiding obesity" was part of choosing healthier lifestyles. The problem with that statement is that a large percentage of people cannot avoid obesity, because obesity is "wired" into their genes or otherwise into their personal biological makeup. People range all over the spectrum. I personally knew a guy who would normally eat four Double Double burgers plus fries when he ate at In-N-Out Burger, and he didn't exercise, but he was trim as a telephone pole. But guys in my family have large lumps of extra fat on their bodies, even if we don't eat that much.
Your casual mention unfortunately reinforced the false notion that people who have obese bodies always are that way because they eat poorly or too much, while people with trim bodies are always that way because they eat wisely and exercise. That false notion just makes life harder for those of us who have obesity regardless of how we eat. I'm sure you didn't intend to make my life more difficult at all, but that's the effect that such casual allusions have. It would be best to stick with unassailable phrases such as "eating wisely."
Answer: Some people definitely are blessed with faster metabolisms, and research indicates that others have a genetic predisposition to packing on weight. But obesity is largely preventable, according to the World Health Organization and other medical authorities.
The WHO recommends that individuals limit the fats and sugars they eat, increase consumption of fruit and vegetables, as well as legumes, whole grains and nuts; and engage in regular physical activity (60 minutes a day for children and 150 minutes spread through the week for adults). Programs such as Weight Watchers or 12-step groups such as Overeaters Anonymous can help provide support. You may never be skinny, but you can definitely take steps to improve your health.
Liz Weston, certified financial planner, is a personal finance columnist for NerdWallet. Questions may be sent to her at 3940 Laurel Canyon, No. 238, Studio City, CA 91604, or by using the "Contact" form at asklizweston.com. Distributed by No More Red Inc.
Get U-T Business in your inbox on Mondays
Get ready for your week with the week's top business stories from San Diego and California, in your inbox Monday mornings.
The family of a delivery driver who died last month when a tornado collapsed the Amazon warehouse in central Illinois where he worked has filed a wrongful death lawsuit
A Polish Senate commission has opened an investigation into the use of powerful spyware against government critics
Ex-Guinean President Conde flown abroad for medical care
Witnesses in the Guinean capital say former President Alpha Conde has been flight out of the country for medical treatment abroad
UK's Johnson, and his foes, await key 'partygate' report
British Prime Minister Boris Johnson is fighting for his career and he has one constant refrain: Wait for Sue Gray
Dakota and Navajo actor Dallas Goldtooth joins other influencers — people who have earned the community's trust — in a two-phase public outreach effort by nonprofit organizations IllumiNative, the Urban Indian Health Institute, and 13 Native groups in states including Alaska, Minnesota, and California
Eurogroup finance chiefs are engaged in a high-wire political balancing act prompted by conflicting economic forces: a weaker growth outlook and stronger inflation
Most read business stories
It's a new year and your SDG&E electric bill just got more expensive
Life science developer buys Costa Verde Center near UTC to complete 'mega campus'
2 courts, 2 sets of COVID-19 emergency workplace rules, 2 different outcomes. What it means
Miramar's family-owned Mor Furniture sells 36-store chain to Chinese buyers
At 102, he's a witness to San Diego's housing evolution
Pandemic hasn't slowed China's love for US lobster
Amazon's UK site backs away from plan to stop taking Visa
Liz Weston: How to get more joy while giving to good causes
Daily virus cases in Russia double as omicron spreads


text:
Airlines Events
China Aircraft Leasing Company enters into an agreement for 36 of Airbus A320neo aircraft
By Sorin Rusi On July 11 2012
China Aircraft Leasing Company (CALC), the fastest growing leasing company in Hong Kong, has signed a Memorandum of Understanding (MoU) with Airbus at the Farnborough International Airshow 2012 event for 36 of Airbus A320neo aircraft. The deal includes 8 A321neo units, the largest A320 family aircraft. You can also opt for Sharklets wings, which have the role of reducing fuel consumption.
CALC currently owns 11 Airbus aircraft: 5 A320, 5 A321 and an A330. Other 3 A330 units and 5 A320 aircraft are expected to be delivered. With the new commitment, China Aircraft Leasing Company's fleet will exceed 50 number of aircraft, all Airbus.
Sharklets are the new wing tips, which are 2.5 meters high and can reduce fuel consumption by up to 3.5%. This translates into a CO2 reduction of approximately 1000 tonnes per plane, in one year.
A320China Aircraft Leasing CompanyFarnborough International AirshowSharklets
Cathay Pacific opted for the 10 Airbus A350-1000 aircraft
Avolon announced order for Boeing 737 MAX and Boeing 737 Next Generation