text:
extern crate rustc_ast;
extern crate rustc_ast_pretty;
extern crate rustc_data_structures;
extern crate rustc_driver;
extern crate rustc_errors;
extern crate rustc_hir;
extern crate rustc_hir_pretty;
extern crate rustc_index;
extern crate rustc_infer;
extern crate rustc_lexer;
extern crate rustc_lint;
extern crate rustc_middle;
extern crate rustc_mir_dataflow;
extern crate rustc_parse;
extern crate rustc_parse_format;
extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_target;
extern crate rustc_trait_selection;
extern crate rustc_typeck;

#[macro_use]
extern crate clippy_utils;

use clippy_utils::parse_msrv;
use rustc_data_structures::fx::FxHashSet;
use rustc_lint::LintId;
use rustc_session::Session;

/// Macro used to declare a Clippy lint.
///
/// Every lint declaration consists of 4 parts:
///
/// 1. The documentation, which is used for the website
/// 2. The `LINT_NAME`. See [lint naming][lint_naming] on lint naming conventions.
/// 3. The `lint_level`, which is a mapping from *one* of our lint groups to `Allow`, `Warn` or
///    `Deny`. The lint level here has nothing to do with what lint groups the lint is a part of.
/// 4. The `description` that contains a short explanation on what's wrong with code where the
///    lint is triggered.
///
/// Currently the categories `style`, `correctness`, `suspicious`, `complexity` and `perf` are
/// enabled by default. As said in the README.md of this repository, if the lint level mapping
/// changes, please update README.md.
///
/// # Example
///
/// ```
/// #![feature(rustc_private)]
/// extern crate rustc_session;
/// use rustc_session::declare_tool_lint;
/// use clippy_lints::declare_clippy_lint;
///
/// declare_clippy_lint! {
///     /// ### What it does
///     /// Checks for ... (describe what the lint matches).
///     ///
///     /// ### Why is this bad?
///     /// Supply the reason for linting the code.
///     ///
///     /// ### Example
///     /// ```rust
///     /// // Bad
///     /// Insert a short example of code that triggers the lint
///     ///
///     /// // Good
///     /// Insert a short example of improved code that doesn't trigger the lint
///     /// ```
///     pub LINT_NAME,
///     pedantic,
///     "description"
/// }
/// ```
/// [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
#[macro_export]
macro_rules! declare_clippy_lint {
    { $(#[$attr:meta])* pub $name:tt, style, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, correctness, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Deny, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, suspicious, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, complexity, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, perf, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, pedantic, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, restriction, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, cargo, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, nursery, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, internal, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Allow, $description, report_in_external_macro: true
        }
    };
    { $(#[$attr:meta])* pub $name:tt, internal_warn, $description:tt } => {
        declare_tool_lint! {
            $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
        }
    };
}

#[cfg(feature = "metadata-collector-lint")]
mod deprecated_lints;
mod utils;

// begin lints modules, do not remove this comment, it's used in `update_lints`
mod absurd_extreme_comparisons;
mod approx_const;
mod arithmetic;
mod as_conversions;
mod asm_syntax;
mod assertions_on_constants;
mod assign_ops;
mod async_yields_async;
mod attrs;
mod await_holding_invalid;
mod bit_mask;
mod blacklisted_name;
mod blocks_in_if_conditions;
mod bool_assert_comparison;
mod booleans;
mod bytecount;
mod cargo_common_metadata;
mod case_sensitive_file_extension_comparisons;
mod casts;
mod checked_conversions;
mod cognitive_complexity;
mod collapsible_if;
mod collapsible_match;
mod comparison_chain;
mod copies;
mod copy_iterator;
mod create_dir;
mod dbg_macro;
mod default;
mod default_numeric_fallback;
mod dereference;
mod derivable_impls;
mod derive;
mod disallowed_method;
mod disallowed_script_idents;
mod disallowed_type;
mod doc;
mod double_comparison;
mod double_parens;
mod drop_forget_ref;
mod duration_subsec;
mod else_if_without_else;
mod empty_enum;
mod entry;
mod enum_clike;
mod enum_variants;
mod eq_op;
mod equatable_if_let;
mod erasing_op;
mod escape;
mod eta_reduction;
mod eval_order_dependence;
mod excessive_bools;
mod exhaustive_items;
mod exit;
mod explicit_write;
mod fallible_impl_from;
mod feature_name;
mod float_equality_without_abs;
mod float_literal;
mod floating_point_arithmetic;
mod format;
mod format_args;
mod formatting;
mod from_over_into;
mod from_str_radix_10;
mod functions;
mod future_not_send;
mod get_last_with_len;
mod identity_op;
mod if_let_mutex;
mod if_not_else;
mod if_then_some_else_none;
mod implicit_hasher;
mod implicit_return;
mod implicit_saturating_sub;
mod inconsistent_struct_constructor;
mod indexing_slicing;
mod infinite_iter;
mod inherent_impl;
mod inherent_to_string;
mod inline_fn_without_body;
mod int_plus_one;
mod integer_division;
mod invalid_upcast_comparisons;
mod items_after_statements;
mod iter_not_returning_iterator;
mod large_const_arrays;
mod large_enum_variant;
mod large_stack_arrays;
mod len_zero;
mod let_if_seq;
mod let_underscore;
mod lifetimes;
mod literal_representation;
mod loops;
mod macro_use;
mod main_recursion;
mod manual_assert;
mod manual_async_fn;
mod manual_map;
mod manual_non_exhaustive;
mod manual_ok_or;
mod manual_strip;
mod manual_unwrap_or;
mod map_clone;
mod map_err_ignore;
mod map_unit_fn;
mod match_on_vec_items;
mod match_result_ok;
mod match_str_case_mismatch;
mod matches;
mod mem_forget;
mod mem_replace;
mod methods;
mod minmax;
mod misc;
mod misc_early;
mod missing_const_for_fn;
mod missing_doc;
mod missing_enforced_import_rename;
mod missing_inline;
mod module_style;
mod modulo_arithmetic;
mod multiple_crate_versions;
mod mut_key;
mod mut_mut;
mod mut_mutex_lock;
mod mut_reference;
mod mutable_debug_assertion;
mod mutex_atomic;
mod needless_arbitrary_self_type;
mod needless_bitwise_bool;
mod needless_bool;
mod needless_borrow;
mod needless_borrowed_ref;
mod needless_continue;
mod needless_for_each;
mod needless_option_as_deref;
mod needless_pass_by_value;
mod needless_question_mark;
mod needless_update;
mod neg_cmp_op_on_partial_ord;
mod neg_multiply;
mod new_without_default;
mod no_effect;
mod non_copy_const;
mod non_expressive_names;
mod non_octal_unix_permissions;
mod non_send_fields_in_send_ty;
mod nonstandard_macro_braces;
mod open_options;
mod option_env_unwrap;
mod option_if_let_else;
mod overflow_check_conditional;
mod panic_in_result_fn;
mod panic_unimplemented;
mod partialeq_ne_impl;
mod pass_by_ref_or_value;
mod path_buf_push_overwrite;
mod pattern_type_mismatch;
mod precedence;
mod ptr;
mod ptr_eq;
mod ptr_offset_with_cast;
mod question_mark;
mod ranges;
mod redundant_clone;
mod redundant_closure_call;
mod redundant_else;
mod redundant_field_names;
mod redundant_pub_crate;
mod redundant_slicing;
mod redundant_static_lifetimes;
mod ref_option_ref;
mod reference;
mod regex;
mod repeat_once;
mod returns;
mod same_name_method;
mod self_assignment;
mod self_named_constructors;
mod semicolon_if_nothing_returned;
mod serde_api;
mod shadow;
mod single_component_path_imports;
mod size_of_in_element_count;
mod slow_vector_initialization;
mod stable_sort_primitive;
mod strings;
mod strlen_on_c_strings;
mod suspicious_operation_groupings;
mod suspicious_trait_impl;
mod swap;
mod tabs_in_doc_comments;
mod temporary_assignment;
mod to_digit_is_some;
mod to_string_in_display;
mod trailing_empty_array;
mod trait_bounds;
mod transmute;
mod transmuting_null;
mod try_err;
mod types;
mod undocumented_unsafe_blocks;
mod undropped_manually_drops;
mod unicode;
mod uninit_vec;
mod unit_hash;
mod unit_return_expecting_ord;
mod unit_types;
mod unnamed_address;
mod unnecessary_self_imports;
mod unnecessary_sort_by;
mod unnecessary_wraps;
mod unnested_or_patterns;
mod unsafe_removed_from_name;
mod unused_async;
mod unused_io_amount;
mod unused_self;
mod unused_unit;
mod unwrap;
mod unwrap_in_result;
mod upper_case_acronyms;
mod use_self;
mod useless_conversion;
mod vec;
mod vec_init_then_push;
mod vec_resize_to_zero;
mod verbose_file_reads;
mod wildcard_dependencies;
mod wildcard_imports;
mod write;
mod zero_div_zero;
mod zero_sized_map_values;
// end lints modules, do not remove this comment, it's used in `update_lints`

pub use crate::utils::conf::Conf;
use crate::utils::conf::TryConf;

/// Register all pre expansion lints
///
/// Pre-expansion lints run before any macro expansion has happened.
///
/// Note that due to the architecture of the compiler, currently `cfg_attr` attributes on crate
/// level (i.e `#![cfg_attr(...)]`) will still be expanded even when using a pre-expansion pass.
///
/// Used in `./src/driver.rs`.
pub fn register_pre_expansion_lints(store: &mut rustc_lint::LintStore) {
    // NOTE: Do not add any more pre-expansion passes. These should be removed eventually.
    store.register_pre_expansion_pass(|| Box::new(write::Write::default()));
    store.register_pre_expansion_pass(|| Box::new(attrs::EarlyAttributes));
    store.register_pre_expansion_pass(|| Box::new(dbg_macro::DbgMacro));
}

#[doc(hidden)]
pub fn read_conf(sess: &Session) -> Conf {
    let file_name = match utils::conf::lookup_conf_file() {
        Ok(Some(path)) => path,
        Ok(None) => return Conf::default(),
        Err(error) => {
            sess.struct_err(&format!("error finding Clippy's configuration file: {}", error))
                .emit();
            return Conf::default();
        },
    };

    let TryConf { conf, errors } = utils::conf::read(&file_name);
    // all conf errors are non-fatal, we just use the default conf in case of error
    for error in errors {
        sess.struct_err(&format!(
            "error reading Clippy's configuration file `{}`: {}",
            file_name.display(),
            error
        ))
        .emit();
    }

    conf
}

/// Register all lints and lint groups with the rustc plugin registry
///
/// Used in `./src/driver.rs`.
#[allow(clippy::too_many_lines)]
#[rustfmt::skip]
pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: &Conf) {
    register_removed_non_tool_lints(store);

    include!("lib.deprecated.rs");

    include!("lib.register_lints.rs");
    include!("lib.register_restriction.rs");
    include!("lib.register_pedantic.rs");

    #[cfg(feature = "internal-lints")]
    include!("lib.register_internal.rs");

    include!("lib.register_all.rs");
    include!("lib.register_style.rs");
    include!("lib.register_complexity.rs");
    include!("lib.register_correctness.rs");
    include!("lib.register_suspicious.rs");
    include!("lib.register_perf.rs");
    include!("lib.register_cargo.rs");
    include!("lib.register_nursery.rs");

    #[cfg(feature = "metadata-collector-lint")]
    {
        if std::env::var("ENABLE_METADATA_COLLECTION").eq(&Ok("1".to_string())) {
            store.register_late_pass(|| Box::new(utils::internal_lints::metadata_collector::MetadataCollector::new()));
            return;
        }
    }

    // all the internal lints
    #[cfg(feature = "internal-lints")]
    {
        store.register_early_pass(|| Box::new(utils::internal_lints::ClippyLintsInternal));
        store.register_early_pass(|| Box::new(utils::internal_lints::ProduceIce));
        store.register_late_pass(|| Box::new(utils::inspector::DeepCodeInspector));
        store.register_late_pass(|| Box::new(utils::internal_lints::CollapsibleCalls));
        store.register_late_pass(|| Box::new(utils::internal_lints::CompilerLintFunctions::new()));
        store.register_late_pass(|| Box::new(utils::internal_lints::IfChainStyle));
        store.register_late_pass(|| Box::new(utils::internal_lints::InvalidPaths));
        store.register_late_pass(|| Box::new(utils::internal_lints::InterningDefinedSymbol::default()));
        store.register_late_pass(|| Box::new(utils::internal_lints::LintWithoutLintPass::default()));
        store.register_late_pass(|| Box::new(utils::internal_lints::MatchTypeOnDiagItem));
        store.register_late_pass(|| Box::new(utils::internal_lints::OuterExpnDataPass));
    }

    store.register_late_pass(|| Box::new(utils::author::Author));
    store.register_late_pass(|| Box::new(await_holding_invalid::AwaitHolding));
    store.register_late_pass(|| Box::new(serde_api::SerdeApi));
    let vec_box_size_threshold = conf.vec_box_size_threshold;
    let type_complexity_threshold = conf.type_complexity_threshold;
    let avoid_breaking_exported_api = conf.avoid_breaking_exported_api;
    store.register_late_pass(move || Box::new(types::Types::new(
        vec_box_size_threshold,
        type_complexity_threshold,
        avoid_breaking_exported_api,
    )));
    store.register_late_pass(|| Box::new(booleans::NonminimalBool));
    store.register_late_pass(|| Box::new(needless_bitwise_bool::NeedlessBitwiseBool));
    store.register_late_pass(|| Box::new(eq_op::EqOp));
    store.register_late_pass(|| Box::new(enum_clike::UnportableVariant));
    store.register_late_pass(|| Box::new(float_literal::FloatLiteral));
    let verbose_bit_mask_threshold = conf.verbose_bit_mask_threshold;
    store.register_late_pass(move || Box::new(bit_mask::BitMask::new(verbose_bit_mask_threshold)));
    store.register_late_pass(|| Box::new(ptr::Ptr));
    store.register_late_pass(|| Box::new(ptr_eq::PtrEq));
    store.register_late_pass(|| Box::new(needless_bool::NeedlessBool));
    store.register_late_pass(|| Box::new(needless_option_as_deref::OptionNeedlessDeref));
    store.register_late_pass(|| Box::new(needless_bool::BoolComparison));
    store.register_late_pass(|| Box::new(needless_for_each::NeedlessForEach));
    store.register_late_pass(|| Box::new(misc::MiscLints));
    store.register_late_pass(|| Box::new(eta_reduction::EtaReduction));
    store.register_late_pass(|| Box::new(identity_op::IdentityOp));
    store.register_late_pass(|| Box::new(erasing_op::ErasingOp));
    store.register_late_pass(|| Box::new(mut_mut::MutMut));
    store.register_late_pass(|| Box::new(mut_reference::UnnecessaryMutPassed));
    store.register_late_pass(|| Box::new(len_zero::LenZero));
    store.register_late_pass(|| Box::new(attrs::Attributes));
    store.register_late_pass(|| Box::new(blocks_in_if_conditions::BlocksInIfConditions));
    store.register_late_pass(|| Box::new(collapsible_match::CollapsibleMatch));
    store.register_late_pass(|| Box::new(unicode::Unicode));
    store.register_late_pass(|| Box::new(uninit_vec::UninitVec));
    store.register_late_pass(|| Box::new(unit_hash::UnitHash));
    store.register_late_pass(|| Box::new(unit_return_expecting_ord::UnitReturnExpectingOrd));
    store.register_late_pass(|| Box::new(strings::StringAdd));
    store.register_late_pass(|| Box::new(implicit_return::ImplicitReturn));
    store.register_late_pass(|| Box::new(implicit_saturating_sub::ImplicitSaturatingSub));
    store.register_late_pass(|| Box::new(default_numeric_fallback::DefaultNumericFallback));
    store.register_late_pass(|| Box::new(inconsistent_struct_constructor::InconsistentStructConstructor));
    store.register_late_pass(|| Box::new(non_octal_unix_permissions::NonOctalUnixPermissions));
    store.register_early_pass(|| Box::new(unnecessary_self_imports::UnnecessarySelfImports));

    let msrv = conf.msrv.as_ref().and_then(|s| {
        parse_msrv(s, None, None).or_else(|| {
            sess.err(&format!("error reading Clippy's configuration file. `{}` is not a valid Rust version", s));
            None
        })
    });

    let avoid_breaking_exported_api = conf.avoid_breaking_exported_api;
    store.register_late_pass(move || Box::new(approx_const::ApproxConstant::new(msrv)));
    store.register_late_pass(move || Box::new(methods::Methods::new(avoid_breaking_exported_api, msrv)));
    store.register_late_pass(move || Box::new(matches::Matches::new(msrv)));
    store.register_early_pass(move || Box::new(manual_non_exhaustive::ManualNonExhaustive::new(msrv)));
    store.register_late_pass(move || Box::new(manual_strip::ManualStrip::new(msrv)));
    store.register_early_pass(move || Box::new(redundant_static_lifetimes::RedundantStaticLifetimes::new(msrv)));
    store.register_early_pass(move || Box::new(redundant_field_names::RedundantFieldNames::new(msrv)));
    store.register_late_pass(move || Box::new(checked_conversions::CheckedConversions::new(msrv)));
    store.register_late_pass(move || Box::new(mem_replace::MemReplace::new(msrv)));
    store.register_late_pass(move || Box::new(ranges::Ranges::new(msrv)));
    store.register_late_pass(move || Box::new(from_over_into::FromOverInto::new(msrv)));
    store.register_late_pass(move || Box::new(use_self::UseSelf::new(msrv)));
    store.register_late_pass(move || Box::new(missing_const_for_fn::MissingConstForFn::new(msrv)));
    store.register_late_pass(move || Box::new(needless_question_mark::NeedlessQuestionMark));
    store.register_late_pass(move || Box::new(casts::Casts::new(msrv)));
    store.register_early_pass(move || Box::new(unnested_or_patterns::UnnestedOrPatterns::new(msrv)));

    store.register_late_pass(|| Box::new(size_of_in_element_count::SizeOfInElementCount));
    store.register_late_pass(|| Box::new(same_name_method::SameNameMethod));
    store.register_late_pass(|| Box::new(map_clone::MapClone));
    store.register_late_pass(|| Box::new(map_err_ignore::MapErrIgnore));
    store.register_late_pass(|| Box::new(shadow::Shadow::default()));
    store.register_late_pass(|| Box::new(unit_types::UnitTypes));
    store.register_late_pass(|| Box::new(loops::Loops));
    store.register_late_pass(|| Box::new(main_recursion::MainRecursion::default()));
    store.register_late_pass(|| Box::new(lifetimes::Lifetimes));
    store.register_late_pass(|| Box::new(entry::HashMapPass));
    store.register_late_pass(|| Box::new(minmax::MinMaxPass));
    store.register_late_pass(|| Box::new(open_options::OpenOptions));
    store.register_late_pass(|| Box::new(zero_div_zero::ZeroDiv));
    store.register_late_pass(|| Box::new(mutex_atomic::Mutex));
    store.register_late_pass(|| Box::new(needless_update::NeedlessUpdate));
    store.register_late_pass(|| Box::new(needless_borrow::NeedlessBorrow::default()));
    store.register_late_pass(|| Box::new(needless_borrowed_ref::NeedlessBorrowedRef));
    store.register_late_pass(|| Box::new(no_effect::NoEffect));
    store.register_late_pass(|| Box::new(temporary_assignment::TemporaryAssignment));
    store.register_late_pass(|| Box::new(transmute::Transmute));
    let cognitive_complexity_threshold = conf.cognitive_complexity_threshold;
    store.register_late_pass(move || Box::new(cognitive_complexity::CognitiveComplexity::new(cognitive_complexity_threshold)));
    let too_large_for_stack = conf.too_large_for_stack;
    store.register_late_pass(move || Box::new(escape::BoxedLocal{too_large_for_stack}));
    store.register_late_pass(move || Box::new(vec::UselessVec{too_large_for_stack}));
    store.register_late_pass(|| Box::new(panic_unimplemented::PanicUnimplemented));
    store.register_late_pass(|| Box::new(strings::StringLitAsBytes));
    store.register_late_pass(|| Box::new(derive::Derive));
    store.register_late_pass(|| Box::new(derivable_impls::DerivableImpls));
    store.register_late_pass(|| Box::new(get_last_with_len::GetLastWithLen));
    store.register_late_pass(|| Box::new(drop_forget_ref::DropForgetRef));
    store.register_late_pass(|| Box::new(empty_enum::EmptyEnum));
    store.register_late_pass(|| Box::new(absurd_extreme_comparisons::AbsurdExtremeComparisons));
    store.register_late_pass(|| Box::new(invalid_upcast_comparisons::InvalidUpcastComparisons));
    store.register_late_pass(|| Box::new(regex::Regex));
    store.register_late_pass(|| Box::new(copies::CopyAndPaste));
    store.register_late_pass(|| Box::new(copy_iterator::CopyIterator));
    store.register_late_pass(|| Box::new(format::UselessFormat));
    store.register_late_pass(|| Box::new(swap::Swap));
    store.register_late_pass(|| Box::new(overflow_check_conditional::OverflowCheckConditional));
    store.register_late_pass(|| Box::new(new_without_default::NewWithoutDefault::default()));
    let blacklisted_names = conf.blacklisted_names.iter().cloned().collect::<FxHashSet<_>>();
    store.register_late_pass(move || Box::new(blacklisted_name::BlacklistedName::new(blacklisted_names.clone())));
    let too_many_arguments_threshold = conf.too_many_arguments_threshold;
    let too_many_lines_threshold = conf.too_many_lines_threshold;
    store.register_late_pass(move || Box::new(functions::Functions::new(too_many_arguments_threshold, too_many_lines_threshold)));
    let doc_valid_idents = conf.doc_valid_idents.iter().cloned().collect::<FxHashSet<_>>();
    store.register_late_pass(move || Box::new(doc::DocMarkdown::new(doc_valid_idents.clone())));
    store.register_late_pass(|| Box::new(neg_multiply::NegMultiply));
    store.register_late_pass(|| Box::new(mem_forget::MemForget));
    store.register_late_pass(|| Box::new(arithmetic::Arithmetic::default()));
    store.register_late_pass(|| Box::new(assign_ops::AssignOps));
    store.register_late_pass(|| Box::new(let_if_seq::LetIfSeq));
    store.register_late_pass(|| Box::new(eval_order_dependence::EvalOrderDependence));
    store.register_late_pass(|| Box::new(missing_doc::MissingDoc::new()));
    store.register_late_pass(|| Box::new(missing_inline::MissingInline));
    store.register_late_pass(move || Box::new(exhaustive_items::ExhaustiveItems));
    store.register_late_pass(|| Box::new(match_result_ok::MatchResultOk));
    store.register_late_pass(|| Box::new(partialeq_ne_impl::PartialEqNeImpl));
    store.register_late_pass(|| Box::new(unused_io_amount::UnusedIoAmount));
    let enum_variant_size_threshold = conf.enum_variant_size_threshold;
    store.register_late_pass(move || Box::new(large_enum_variant::LargeEnumVariant::new(enum_variant_size_threshold)));
    store.register_late_pass(|| Box::new(explicit_write::ExplicitWrite));
    store.register_late_pass(|| Box::new(needless_pass_by_value::NeedlessPassByValue));
    let pass_by_ref_or_value = pass_by_ref_or_value::PassByRefOrValue::new(
        conf.trivial_copy_size_limit,
        conf.pass_by_value_size_limit,
        conf.avoid_breaking_exported_api,
        &sess.target,
    );
    store.register_late_pass(move || Box::new(pass_by_ref_or_value));
    store.register_late_pass(|| Box::new(ref_option_ref::RefOptionRef));
    store.register_late_pass(|| Box::new(try_err::TryErr));
    store.register_late_pass(|| Box::new(bytecount::ByteCount));
    store.register_late_pass(|| Box::new(infinite_iter::InfiniteIter));
    store.register_late_pass(|| Box::new(inline_fn_without_body::InlineFnWithoutBody));
    store.register_late_pass(|| Box::new(useless_conversion::UselessConversion::default()));
    store.register_late_pass(|| Box::new(implicit_hasher::ImplicitHasher));
    store.register_late_pass(|| Box::new(fallible_impl_from::FallibleImplFrom));
    store.register_late_pass(|| Box::new(double_comparison::DoubleComparisons));
    store.register_late_pass(|| Box::new(question_mark::QuestionMark));
    store.register_early_pass(|| Box::new(suspicious_operation_groupings::SuspiciousOperationGroupings));
    store.register_late_pass(|| Box::new(suspicious_trait_impl::SuspiciousImpl));
    store.register_late_pass(|| Box::new(map_unit_fn::MapUnit));
    store.register_late_pass(|| Box::new(inherent_impl::MultipleInherentImpl));
    store.register_late_pass(|| Box::new(neg_cmp_op_on_partial_ord::NoNegCompOpForPartialOrd));
    store.register_late_pass(|| Box::new(unwrap::Unwrap));
    store.register_late_pass(|| Box::new(duration_subsec::DurationSubsec));
    store.register_late_pass(|| Box::new(indexing_slicing::IndexingSlicing));
    store.register_late_pass(|| Box::new(non_copy_const::NonCopyConst));
    store.register_late_pass(|| Box::new(ptr_offset_with_cast::PtrOffsetWithCast));
    store.register_late_pass(|| Box::new(redundant_clone::RedundantClone));
    store.register_late_pass(|| Box::new(slow_vector_initialization::SlowVectorInit));
    store.register_late_pass(|| Box::new(unnecessary_sort_by::UnnecessarySortBy));
    store.register_late_pass(move || Box::new(unnecessary_wraps::UnnecessaryWraps::new(avoid_breaking_exported_api)));
    store.register_late_pass(|| Box::new(assertions_on_constants::AssertionsOnConstants));
    store.register_late_pass(|| Box::new(transmuting_null::TransmutingNull));
    store.register_late_pass(|| Box::new(path_buf_push_overwrite::PathBufPushOverwrite));
    store.register_late_pass(|| Box::new(integer_division::IntegerDivision));
    store.register_late_pass(|| Box::new(inherent_to_string::InherentToString));
    let max_trait_bounds = conf.max_trait_bounds;
    store.register_late_pass(move || Box::new(trait_bounds::TraitBounds::new(max_trait_bounds)));
    store.register_late_pass(|| Box::new(comparison_chain::ComparisonChain));
    store.register_late_pass(|| Box::new(mut_key::MutableKeyType));
    store.register_late_pass(|| Box::new(modulo_arithmetic::ModuloArithmetic));
    store.register_early_pass(|| Box::new(reference::DerefAddrOf));
    store.register_early_pass(|| Box::new(reference::RefInDeref));
    store.register_early_pass(|| Box::new(double_parens::DoubleParens));
    store.register_late_pass(|| Box::new(to_string_in_display::ToStringInDisplay::new()));
    store.register_early_pass(|| Box::new(unsafe_removed_from_name::UnsafeNameRemoval));
    store.register_early_pass(|| Box::new(else_if_without_else::ElseIfWithoutElse));
    store.register_early_pass(|| Box::new(int_plus_one::IntPlusOne));
    store.register_early_pass(|| Box::new(formatting::Formatting));
    store.register_early_pass(|| Box::new(misc_early::MiscEarlyLints));
    store.register_early_pass(|| Box::new(redundant_closure_call::RedundantClosureCall));
    store.register_late_pass(|| Box::new(redundant_closure_call::RedundantClosureCall));
    store.register_early_pass(|| Box::new(unused_unit::UnusedUnit));
    store.register_late_pass(|| Box::new(returns::Return));
    store.register_early_pass(|| Box::new(collapsible_if::CollapsibleIf));
    store.register_early_pass(|| Box::new(items_after_statements::ItemsAfterStatements));
    store.register_early_pass(|| Box::new(precedence::Precedence));
    store.register_early_pass(|| Box::new(needless_continue::NeedlessContinue));
    store.register_early_pass(|| Box::new(redundant_else::RedundantElse));
    store.register_late_pass(|| Box::new(create_dir::CreateDir));
    store.register_early_pass(|| Box::new(needless_arbitrary_self_type::NeedlessArbitrarySelfType));
    let cargo_ignore_publish = conf.cargo_ignore_publish;
    store.register_late_pass(move || Box::new(cargo_common_metadata::CargoCommonMetadata::new(cargo_ignore_publish)));
    store.register_late_pass(|| Box::new(multiple_crate_versions::MultipleCrateVersions));
    store.register_late_pass(|| Box::new(wildcard_dependencies::WildcardDependencies));
    let literal_representation_lint_fraction_readability = conf.unreadable_literal_lint_fractions;
    store.register_early_pass(move || Box::new(literal_representation::LiteralDigitGrouping::new(literal_representation_lint_fraction_readability)));
    let literal_representation_threshold = conf.literal_representation_threshold;
    store.register_early_pass(move || Box::new(literal_representation::DecimalLiteralRepresentation::new(literal_representation_threshold)));
    let enum_variant_name_threshold = conf.enum_variant_name_threshold;
    store.register_late_pass(move || Box::new(enum_variants::EnumVariantNames::new(enum_variant_name_threshold, avoid_breaking_exported_api)));
    store.register_early_pass(|| Box::new(tabs_in_doc_comments::TabsInDocComments));
    let upper_case_acronyms_aggressive = conf.upper_case_acronyms_aggressive;
    store.register_late_pass(move || Box::new(upper_case_acronyms::UpperCaseAcronyms::new(avoid_breaking_exported_api, upper_case_acronyms_aggressive)));
    store.register_late_pass(|| Box::new(default::Default::default()));
    store.register_late_pass(|| Box::new(unused_self::UnusedSelf));
    store.register_late_pass(|| Box::new(mutable_debug_assertion::DebugAssertWithMutCall));
    store.register_late_pass(|| Box::new(exit::Exit));
    store.register_late_pass(|| Box::new(to_digit_is_some::ToDigitIsSome));
    let array_size_threshold = conf.array_size_threshold;
    store.register_late_pass(move || Box::new(large_stack_arrays::LargeStackArrays::new(array_size_threshold)));
    store.register_late_pass(move || Box::new(large_const_arrays::LargeConstArrays::new(array_size_threshold)));
    store.register_late_pass(|| Box::new(floating_point_arithmetic::FloatingPointArithmetic));
    store.register_early_pass(|| Box::new(as_conversions::AsConversions));
    store.register_late_pass(|| Box::new(let_underscore::LetUnderscore));
    store.register_early_pass(|| Box::new(single_component_path_imports::SingleComponentPathImports));
    let max_fn_params_bools = conf.max_fn_params_bools;
    let max_struct_bools = conf.max_struct_bools;
    store.register_early_pass(move || Box::new(excessive_bools::ExcessiveBools::new(max_struct_bools, max_fn_params_bools)));
    store.register_early_pass(|| Box::new(option_env_unwrap::OptionEnvUnwrap));
    let warn_on_all_wildcard_imports = conf.warn_on_all_wildcard_imports;
    store.register_late_pass(move || Box::new(wildcard_imports::WildcardImports::new(warn_on_all_wildcard_imports)));
    store.register_late_pass(|| Box::new(verbose_file_reads::VerboseFileReads));
    store.register_late_pass(|| Box::new(redundant_pub_crate::RedundantPubCrate::default()));
    store.register_late_pass(|| Box::new(unnamed_address::UnnamedAddress));
    store.register_late_pass(|| Box::new(dereference::Dereferencing::default()));
    store.register_late_pass(|| Box::new(option_if_let_else::OptionIfLetElse));
    store.register_late_pass(|| Box::new(future_not_send::FutureNotSend));
    store.register_late_pass(|| Box::new(if_let_mutex::IfLetMutex));
    store.register_late_pass(|| Box::new(if_not_else::IfNotElse));
    store.register_late_pass(|| Box::new(equatable_if_let::PatternEquality));
    store.register_late_pass(|| Box::new(mut_mutex_lock::MutMutexLock));
    store.register_late_pass(|| Box::new(match_on_vec_items::MatchOnVecItems));
    store.register_late_pass(|| Box::new(manual_async_fn::ManualAsyncFn));
    store.register_late_pass(|| Box::new(vec_resize_to_zero::VecResizeToZero));
    store.register_late_pass(|| Box::new(panic_in_result_fn::PanicInResultFn));
    let single_char_binding_names_threshold = conf.single_char_binding_names_threshold;
    store.register_early_pass(move || Box::new(non_expressive_names::NonExpressiveNames {
        single_char_binding_names_threshold,
    }));
    let macro_matcher = conf.standard_macro_braces.iter().cloned().collect::<FxHashSet<_>>();
    store.register_early_pass(move || Box::new(nonstandard_macro_braces::MacroBraces::new(&macro_matcher)));
    store.register_late_pass(|| Box::new(macro_use::MacroUseImports::default()));
    store.register_late_pass(|| Box::new(pattern_type_mismatch::PatternTypeMismatch));
    store.register_late_pass(|| Box::new(stable_sort_primitive::StableSortPrimitive));
    store.register_late_pass(|| Box::new(repeat_once::RepeatOnce));
    store.register_late_pass(|| Box::new(unwrap_in_result::UnwrapInResult));
    store.register_late_pass(|| Box::new(self_assignment::SelfAssignment));
    store.register_late_pass(|| Box::new(manual_unwrap_or::ManualUnwrapOr));
    store.register_late_pass(|| Box::new(manual_ok_or::ManualOkOr));
    store.register_late_pass(|| Box::new(float_equality_without_abs::FloatEqualityWithoutAbs));
    store.register_late_pass(|| Box::new(semicolon_if_nothing_returned::SemicolonIfNothingReturned));
    store.register_late_pass(|| Box::new(async_yields_async::AsyncYieldsAsync));
    let disallowed_methods = conf.disallowed_methods.clone();
    store.register_late_pass(move || Box::new(disallowed_method::DisallowedMethod::new(disallowed_methods.clone())));
    store.register_early_pass(|| Box::new(asm_syntax::InlineAsmX86AttSyntax));
    store.register_early_pass(|| Box::new(asm_syntax::InlineAsmX86IntelSyntax));
    store.register_late_pass(|| Box::new(undropped_manually_drops::UndroppedManuallyDrops));
    store.register_late_pass(|| Box::new(strings::StrToString));
    store.register_late_pass(|| Box::new(strings::StringToString));
    store.register_late_pass(|| Box::new(zero_sized_map_values::ZeroSizedMapValues));
    store.register_late_pass(|| Box::new(vec_init_then_push::VecInitThenPush::default()));
    store.register_late_pass(|| Box::new(case_sensitive_file_extension_comparisons::CaseSensitiveFileExtensionComparisons));
    store.register_late_pass(|| Box::new(redundant_slicing::RedundantSlicing));
    store.register_late_pass(|| Box::new(from_str_radix_10::FromStrRadix10));
    store.register_late_pass(|| Box::new(manual_map::ManualMap));
    store.register_late_pass(move || Box::new(if_then_some_else_none::IfThenSomeElseNone::new(msrv)));
    store.register_late_pass(|| Box::new(bool_assert_comparison::BoolAssertComparison));
    store.register_early_pass(move || Box::new(module_style::ModStyle));
    store.register_late_pass(|| Box::new(unused_async::UnusedAsync));
    let disallowed_types = conf.disallowed_types.clone();
    store.register_late_pass(move || Box::new(disallowed_type::DisallowedType::new(disallowed_types.clone())));
    let import_renames = conf.enforced_import_renames.clone();
    store.register_late_pass(move || Box::new(missing_enforced_import_rename::ImportRename::new(import_renames.clone())));
    let scripts = conf.allowed_scripts.clone();
    store.register_early_pass(move || Box::new(disallowed_script_idents::DisallowedScriptIdents::new(&scripts)));
    store.register_late_pass(|| Box::new(strlen_on_c_strings::StrlenOnCStrings));
    store.register_late_pass(move || Box::new(self_named_constructors::SelfNamedConstructors));
    store.register_late_pass(move || Box::new(feature_name::FeatureName));
    store.register_late_pass(move || Box::new(iter_not_returning_iterator::IterNotReturningIterator));
    store.register_late_pass(move || Box::new(manual_assert::ManualAssert));
    let enable_raw_pointer_heuristic_for_send = conf.enable_raw_pointer_heuristic_for_send;
    store.register_late_pass(move || Box::new(non_send_fields_in_send_ty::NonSendFieldInSendTy::new(enable_raw_pointer_heuristic_for_send)));
    store.register_late_pass(move || Box::new(undocumented_unsafe_blocks::UndocumentedUnsafeBlocks::default()));
    store.register_late_pass(|| Box::new(match_str_case_mismatch::MatchStrCaseMismatch));
    store.register_late_pass(move || Box::new(format_args::FormatArgs));
    store.register_late_pass(|| Box::new(trailing_empty_array::TrailingEmptyArray));
    // add lints here, do not remove this comment, it's used in `new_lint`
}

#[rustfmt::skip]
fn register_removed_non_tool_lints(store: &mut rustc_lint::LintStore) {
    store.register_removed(
        "should_assert_eq",
        "`assert!()` will be more flexible with RFC 2011",
    );
    store.register_removed(
        "extend_from_slice",
        "`.extend_from_slice(_)` is a faster way to extend a Vec by a slice",
    );
    store.register_removed(
        "range_step_by_zero",
        "`iterator.step_by(0)` panics nowadays",
    );
    store.register_removed(
        "unstable_as_slice",
        "`Vec::as_slice` has been stabilized in 1.7",
    );
    store.register_removed(
        "unstable_as_mut_slice",
        "`Vec::as_mut_slice` has been stabilized in 1.7",
    );
    store.register_removed(
        "misaligned_transmute",
        "this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr",
    );
    store.register_removed(
        "assign_ops",
        "using compound assignment operators (e.g., `+=`) is harmless",
    );
    store.register_removed(
        "if_let_redundant_pattern_matching",
        "this lint has been changed to redundant_pattern_matching",
    );
    store.register_removed(
        "unsafe_vector_initialization",
        "the replacement suggested by this lint had substantially different behavior",
    );
    store.register_removed(
        "reverse_range_loop",
        "this lint is now included in reversed_empty_ranges",
    );
}

/// Register renamed lints.
///
/// Used in `./src/driver.rs`.
pub fn register_renamed(ls: &mut rustc_lint::LintStore) {
    // NOTE: when renaming a lint, add a corresponding test to tests/ui/rename.rs
    ls.register_renamed("clippy::stutter", "clippy::module_name_repetitions");
    ls.register_renamed("clippy::new_without_default_derive", "clippy::new_without_default");
    ls.register_renamed("clippy::cyclomatic_complexity", "clippy::cognitive_complexity");
    ls.register_renamed("clippy::const_static_lifetime", "clippy::redundant_static_lifetimes");
    ls.register_renamed("clippy::option_and_then_some", "clippy::bind_instead_of_map");
    ls.register_renamed("clippy::box_vec", "clippy::box_collection");
    ls.register_renamed("clippy::block_in_if_condition_expr", "clippy::blocks_in_if_conditions");
    ls.register_renamed("clippy::block_in_if_condition_stmt", "clippy::blocks_in_if_conditions");
    ls.register_renamed("clippy::option_map_unwrap_or", "clippy::map_unwrap_or");
    ls.register_renamed("clippy::option_map_unwrap_or_else", "clippy::map_unwrap_or");
    ls.register_renamed("clippy::result_map_unwrap_or_else", "clippy::map_unwrap_or");
    ls.register_renamed("clippy::option_unwrap_used", "clippy::unwrap_used");
    ls.register_renamed("clippy::result_unwrap_used", "clippy::unwrap_used");
    ls.register_renamed("clippy::option_expect_used", "clippy::expect_used");
    ls.register_renamed("clippy::result_expect_used", "clippy::expect_used");
    ls.register_renamed("clippy::for_loop_over_option", "clippy::for_loops_over_fallibles");
    ls.register_renamed("clippy::for_loop_over_result", "clippy::for_loops_over_fallibles");
    ls.register_renamed("clippy::identity_conversion", "clippy::useless_conversion");
    ls.register_renamed("clippy::zero_width_space", "clippy::invisible_characters");
    ls.register_renamed("clippy::single_char_push_str", "clippy::single_char_add_str");
    ls.register_renamed("clippy::if_let_some_result", "clippy::match_result_ok");

    // uplifted lints
    ls.register_renamed("clippy::invalid_ref", "invalid_value");
    ls.register_renamed("clippy::into_iter_on_array", "array_into_iter");
    ls.register_renamed("clippy::unused_label", "unused_labels");
    ls.register_renamed("clippy::drop_bounds", "drop_bounds");
    ls.register_renamed("clippy::temporary_cstring_as_ptr", "temporary_cstring_as_ptr");
    ls.register_renamed("clippy::panic_params", "non_fmt_panics");
    ls.register_renamed("clippy::unknown_clippy_lints", "unknown_lints");
    ls.register_renamed("clippy::invalid_atomic_ordering", "invalid_atomic_ordering");
    ls.register_renamed("clippy::mem_discriminant_non_enum", "enum_intrinsics_non_enums");
}

// only exists to let the dogfood integration test works.
// Don't run clippy as an executable directly
#[allow(dead_code)]
fn main() {
    panic!("Please use the cargo-clippy executable");
}


text:
Madison CW
- Badger Game Day
- Advertising Sales
- Station Jobs
- Connect With Us
- Pet of the Week
- Money Minute
- School Shout Out
- Birthdays
Livestream 2
Bucky on Parade
Crystal Apple Awards
Project Money
Share Your Holidays
15 Days to the 25th
Fall Harvest Fun
NBC15 Investigates
Most Wisconsinites don't approve of Trump foreign policy, Soleimani killing
President Donald Trump speaks during a campaign rally at UW-Milwaukee Panther Arena, Tuesday, Jan. 14, 2020, in Milwaukee. (AP Photo/ Evan Vucci)
By Associated Press; NBC15 Staff |
Updated: Wed 9:53 PM, Jan 15, 2020
MADISON, Wis. (AP) -- A slight majority of Wisconsin residents did not approve of President Donald Trump's decision earlier this year to kill Iranian general Qasem Soleimani, according to a new poll.
Just over half of respondents — 51 percent — disagreed with the statement that "[i]t's about time the U.S. struck back against Iran," the Marquette University survey found, while 43 percent backed the attack. Despite the strike, however, an overwhelming margin of Wisconsinites (61 percent-30 percent) don't think the country is headed toward a major military conflict.
The poll was conducted between Jan. 8-12, beginning five days after Gen. Soleimani was killed in an airstrike in Iraq, and included 800 registered voters. It had a margin of error of +/- 4.1 percentage points.
Approval of President Trump's foreign policy overall, however, didn't move much, increasing slightly from 43 percent last December to 44 percent now. Fifty-three percent do not approve of the way the President's handling international relations.
President Donald Trump's support in Wisconsin shows little signs of change in the latest Marquette University Law School poll.
The survey released Wednesday shows more respondents are against convicting and removing him from office than those who want to see him ousted after the House voted to impeach.
The first poll of the 2020 election year shows voters are nearly evenly divided over whether Trump is doing a good job or not. The president continues to get high marks from voters in his handling of the economy.
The poll's director, Charles Franklin, said there is stability in numbers, particularly with the Democratic primary. Between December and this month, the top three candidates, which are Joe Biden, Sen. Bernie Sanders, Mayor Pete Buttigieg and Sen. Elizabeth Warren, did not change percentages.
"I think the thing for people to watch for is as we are coming up on the Iowa Caucus the first Monday in February and then soon after that the New Hampshire primary, that is when the field of primary candidates really get some shaking up. So. I think this month was the quiet before the storm," he said.
The poll of 800 registered voters had a 4.2 percentage point margin of error.
Gov. Evers requests FEMA storm damage assessments in SE Wisconsin
Preparations underway for Vice President Mike Pence
Evers signs order creating new redistricting commission
Wisconsin lawmaker accuses Kaul of bullying to pass rape kit bill
Badger Game Day
School Shout Out
NBC15
Newsroom: 608-274-1500

redpajama_set_name: RedPajamaCommonCrawl


text:
Letter: House heritage displays in Canalside visitors center
By Staff|Published Sun, Sep 25, 2016
House heritage displays in Canalside visitors center
A recent News article featured the City of Lockport's continued celebration of its Erie Canal heritage, most recently with plans for a replica of a canal boat. I commend Lockport's leaders, but I am consistently perplexed by Buffalo's and the Erie Canal Harbor Development Corp.'s failure to recognize the canal's importance to the heritage of Buffalo.
Yes, Lockport has real locks, not an ersatz canal, but it was Buffalo that was the western terminus of the canal that changed America. Canalside should have a brick-and-mortar Buffalo Erie Canal Visitors Center that could house its own canal packet boat, displays featuring the workers who built the canal, working models of the canal and its locks, names of famous and ordinary folks who embarked on their westward migration via the canal, and other canal-oriented elements.
Lighter, quicker, cheaper has worked admirably for many Canalside elements, but appropriate recognition of Buffalo's Erie Canal heritage calls for an Ellis Island-type, brick-and-mortar visitors center.
Angelo F. Coniglio


The Danish pharma company has announced an increased commitment to stem cell-based therapies, something made possible through a collaborations with the University of California San Francisco (UCSF) in which a first milestone in the development of human embryonic stem cell lines has been reached.
Under the terms of the agreement with UCSF, Novo Nordisk has licenced a technology to enable the generation of good manufacturing practice (GMP) compliant human embryonic stem cell (hESC) lines as well as the rights to further develop these into future regenerative medicine therapies. The milestone was reached in early May when a new GMP laboratory at UCSF was inaugurated. Employees from the university and Novo Nordisk will be working here on deriving the cell lines that are expected to define a new quality standard in production of stem cell-based therapies, reports the company.
Together with Cornell University, Novo Nordisk has also made progress in developing an encapsulation device that will protect the beta cells that are transplanted into patients from attack by the immune system. Novo Nordisk anticipates that the first clinical trial could be initiated within the next few years.
"Finding a cure for diabetes is part of Novo Nordisk's vision and recent progress in our stem cell research and the access to robust and high-quality cell lines raises hopes for people with type 1 diabetes. Our collaboration with UCSF is also expected to accelerate current and future partnerships to develop stem cell-based therapies for treatment of other serious chronic diseases", said Mads Krogsgaard Thomsen, executive vice president and chief science officer of Novo Nordisk.
The development of GMP grade stem cell lines in collaboration with UCSF has also enabled Novo Nordisk to expand the focus on serious chronic diseases beyond diabetes. For example, through partnerships with the Swedish biotech company Biolamina and Lund University, activities have been initiated to develop stem cell-based treatments for Parkinson's disease. In another partnership with Biolamina and the DUKE National University Singapore Medical School, the research focus is on chronic heart failure and age-related macular degeneration. Novo Nordisk has an ambition to pursue further collaborations to develop stem cell-based therapies for other serious chronic diseases.


Pink eye (also called conjunctivitis) is redness and swelling of the conjunctiva, the mucous membrane that lines the eyelid and eye surface. The lining of the eye is usually clear. If irritation or infection occurs, the lining becomes red and swollen. See pictures of a normal eye and an eye with conjunctivitis.
Pink eye is very common. It usually is not serious and goes away in 7 to 10 days without medical treatment.
Viral and bacterial pink eye are contagious and spread very easily. Since most pink eye is caused by viruses for which there is usually no medical treatment, preventing its spread is important. Poor handwashing is the main cause of the spread of pink eye. Sharing an object, such as a face cloth or towel, with a person who has pink eye can spread the infection. For more information, see Prevention.
Viral pink eye is often caused by an adenovirus, which is a common respiratory virus that can also cause a sore throat or upper respiratory infection. The herpes virus can also cause viral pink eye.
Viral pink eye symptoms usually last 5 to 7 days but may last up to 3 weeks and can become ongoing or chronic.
Medicines are not usually used to treat viral pink eye, so it is important to prevent the spread of the infection. Pink eye caused by a herpes virus, which is rare, can be treated with an antiviral medicine. Home treatment of viral pink eye symptoms can help you feel more comfortable while the infection goes away.
People with pink eye should stay at home until their symptoms are gone.
Bacterial pink eye may cause more drainage than viral pink eye. Bacterial infections usually last 7 to 10 days without antibiotic treatment and 2 to 4 days with antibiotic treatment. The person can usually return to daycare, school, or work 24 hours after an antibiotic has been started if symptoms have improved. Prescription antibiotic treatment usually kills the bacteria that cause pink eye.
Glaucoma . For more information, see the topics Eye Problems, Non-Injury and Glaucoma.
Infection of the eye socket and areas around the eye. For more information, see the topic Eye Problems, Non-Injury.
Do you think you have pink eye?
Pink eye (conjunctivitis) is redness and swelling of the conjunctiva, which lines the eyelid and covers the surface of the eye.
Is there any blood in the coloured part of the eye?
Blood that is only in the white part of the eye is usually not as serious as blood in the coloured part of the eye.
Home treatment for pink eye will help reduce your pain and keep your eye free of drainage. If you wear contacts, remove them and wear glasses until your symptoms have gone away completely. Thoroughly clean your contacts and storage case.
Cold compresses or warm compresses (whichever feels best) can be used. If an allergy is the problem, a cool compress may feel better. If the pink eye is caused by an infection, then a warm, moist compress may soothe your eye and help reduce redness and swelling. Warm, moist compresses can spread infection from one eye to the other. Use a different compress for each eye, and use a clean compress for each application.
When cleaning your eye, wipe from the inside (next to the nose) toward the outside. Use a clean surface for each wipe so that drainage being cleaned away is not rubbed back across the eye. If tissues or wipes are used, make sure they are put in the trash and are not allowed to sit around. If face cloths are used to clean the eye, put them in the laundry right away so that no one else picks them up or uses them. After wiping your eye, wash your hands to prevent the pink eye from spreading.
To learn how to prevent the spread of pink eye, see Prevention.
Do not go to daycare or school or go to work until pink eye has improved.
If the pink eye is caused by a virus, the person can usually return to daycare, school, or work when symptoms begin to improve, typically in 3 to 5 days. Medicines are not usually used to treat viral pink eye, so preventing its spread is important. Home treatment of the symptoms will help you feel more comfortable while the infection goes away.
If the pink eye is caused by bacteria, the person can usually return to daycare, school, or work after the infection has been treated for 24 hours with an antibiotic and symptoms are improving. Prescription antibiotic treatment usually kills the bacteria that cause pink eye.
For pink eye related to allergies, antihistamines, such as loratadine (Claritin) or cetirizine (Zyrtec), may help relieve your symptoms. Don't give antihistamines to your child unless you've checked with the doctor first.
Pink eye is spread through contact with the eye drainage, which contains the virus or bacteria that caused the pink eye. Touching an infected eye leaves drainage on your hand. If you touch your other eye or an object when you have drainage on your hand, the virus or bacteria can be spread.
The following tips help prevent the spread of pink eye.
Do not share towels, linens, pillows, or handkerchiefs. Use clean linens, towels, and face cloths daily.
What prescription or non-prescription medicines have you tried? Did they help?


text:
Printable Form 8300 Charlotte North Carolina 2014-2023
Printable Form 8300 Charlotte North Carolina
Printable Form 8300 Charlotte North Carolina: What You Should Know
The Carolina League has an affiliate with the New York-Penn League. The Carolina has an affiliate with the New York-Penn League. The Carolina League has a division name for its teams — the Carolina League East (aka North Division). The Carolina League West (aka South Division) has a division name — the Carolina League West (aka Central League). All transactions involving Major League Baseball players, regardless of the players' clubs, are reported to the Major League Baseball Players Association to report those players receiving over 200 in any season or a 10-day period within a 10-year period (as explained in the MLB rule on "Transactions Involving Major League Players"). The "Major League Player" referred to here is the player with whom the transaction with a minor league team occurs. The transaction for Charlotte Knights Schedule is a 10-day and 10-day-a-year transaction, respectively. The transaction for Carolina League East is a 10-day transaction. For both transactions, the actual amount paid is listed on the left side of the page. The payment is listed to the right side of the page. For any 10-day transaction: Payment must be less than or equal to 25.00. In the case of a 10-day-a-year "trade" (described above) which has not been completed within 10 days after the trade, any proceeds from the sale of the player other than those which are received by the minor league affiliate must be reported to the player's new club (as explained further in the Major League Rule). It may be received by the player's former club or an "independent" league. Payments received by the minor league affiliate are recorded on that affiliate's ledger sheet. Form 8300 (Rev-Aug 2014) — IRS Form 8300, Report of Cash Payments Over 10,000 in a Trade or Business, provides valuable information to the Internal Revenue Service for the following categories: Transactions in which the player or player's partner, assignor, or assigns made a substantial direct or indirect financial contribution to the acquiring team. This category includes the following types of transactions: Transactions in which the player himself became, or who otherwise became, a party to a substantial contribution to the acquiring team.
Online methods assist you to arrange your doc management and supercharge the productiveness within your workflow. Go along with the short guideline to be able to complete Printable Form 8300 Charlotte North Carolina, keep away from glitches and furnish it inside a timely method:
How to complete a Printable Form 8300 Charlotte North Carolina?
Put an digital signature on your Printable Form 8300 Charlotte North Carolina aided by the enable of Indicator Instrument.
PDF editor allows you to make adjustments with your Printable Form 8300 Charlotte North Carolina from any world-wide-web connected equipment, personalize it in line with your requirements, indication it electronically and distribute in several methods.
Form 8300 Oklahoma City Oklahoma
Form 8300 for Pompano Beach Florida
Killeen Texas Form 8300


Whether you're planning a large meeting or small retreat, the Kona Kai Resort combines spectacular views of San Diego Harbor, eleven acres of lush tropical gardens, and 56,000 square feet of versatile indoor and outdoor meeting spaces, including courtyards, gardens, and a private beach. For decades, Kona Kai Resort served as an exclusive meeting place for dignitaries and celebrities. Now, you can bring that same sense of luxury and style to your next conference, meeting, or retreat.
Business in paradise may sound strange, but at Ocean Key Resort & Spa it's an everyday occurrence. With state-of-the-art technology and a complete range of indoor and outdoor meeting and conference spaces, Ocean Key Resort & Spa is ready to accommodate groups of 20 to 250 people. Ocean Key Resort and Spa also offers dedicated audio visual and information technology specialists, fast T-1 and wireless Internet service, and other business amenities and capabilities you need for a productive, successful meeting or event.
A true boutique resort on the Southwest Florida Gulf Coast, LaPlaya Beach & Golf Resort is the ideal locale for memorable corporate events and productive meetings—with more than 8,000 square feet of indoor conference facilities with breathtaking views, nearly 4,000 square feet of outdoor meeting spaces, and an experienced event planning staff. It's the perfect environment for productive brainstorming, impressive meetings, and after hours entertainment.
As the only Los Angeles hotel located directly on the Pacific Ocean, The Portofino Hotel and Marina offers a business retreat that engages all the senses. Spacious guestrooms with private balconies capture the casual elegance of this California setting, a million dollar transformation touches every indoor and outdoor space, and more than 8,000 square feet of event space provides the perfect waterfront venue for your next business function—whether it's a large conference or a casual department meeting.
Your next event or meeting deserves the best, and Seattle's only waterfront hotel is ready to deliver. Awarded Four-Diamonds by AAA and chosen as Seattle's Best Hotel Location by Frommer's Guide, this quintessential Seattle landmark is within walking distance of Seattle's most popular attractions. The Edgewater also offers you more than 10,000 square feet of flexible meeting and event space, a team of event planners, and a distinctive personality that will leave a lasting impression on your customers and employees.
Hold your next meeting or retreat in the heart of wine country in Napa Valley, a peaceful sanctuary nestled among lush, rolling hills, a sea of vivid wildflowers, and radiant vineyards. River Terrace Inn features luxurious accommodations, personalized services, and relaxed meeting and event facilities—all located in a pristine riverfront setting. Make a lasting impression with this enchanting blend of modern elegance, laid-back California charm and the energy of downtown Napa, California.
There are many reasons to hold your next meeting or event at Colorado's Gateway Canyons Resort, an award-winning destination located in the secluded Unaweep Canyon of Western Colorado. Surrounded by the vast lands of the Uncompahgre Plateau, Piñon Mesa, and La Sal Mountains, this full-service resort combines nearly 9,000 square feet of modern meeting space with exceptional lodging, dining, outdoor activities, and the world-class Gateway Colorado Auto Museum.
The Pelican Grand Beach Resort combines a dedicated event planning staff and modern meeting spaces with breathtaking views from the sands of Fort Lauderdale. Sitting directly on the Atlantic Ocean, this historic resort features a beautiful zero entry pool, Fort Lauderdale's only Lazy River and private beach, and modern business amenities like complimentary high-speed Internet service and a modern fitness center.
Whether planning a small executive retreat in a private hospitality suite or an extravagant affair in one of the resort's spacious ballrooms or outdoor spaces, the Hilton San Diego Resort & Spa can accommodate meetings in an intimate or grandiose scale. Treat your group to a beautiful waterfront location with catering and event staff as close at hand as the bay itself.
Productive and flawless meetings are our business, with a combined total of 5,000 square feet of flexible and attractive meeting and function space. Our seasoned Catering and Conference Team is here to ensure your program needs are met so that attendees may explore the spectacular backyard of Jackson Hole, home to the nations' premier skiing and epic mountain landscapes of Grand Teton and Yellowstone National Parks.
You take your meeting or event to the next level when you host it at Hotel Terra. With the backdrop of spectacular Jackson Hole, our hotel provides a combined 5,000 square feet of beautifully designed, naturally-lit meeting spaces that can be customized to your specific needs or theme. Hotel Terra provides great options for every type of gathering. Our seasoned catering team will take care of every last detail and make sure that your event exceeds every expectation.
Mix Business And Pleasure At San Francisco's Argonaut Hotel. Is the pressure on to create a buttoned-down business meeting or splashy special event? Not to worry. Just consider our gorgeous waterfront setting and the exclusive ambiance of our historic property part of your portfolio. And it goes without saying that whatever your plans, you will have the attentive support of our professional staff. Whether it's room set-ups, catering or A/V equipment, we get the big picture: make you the star and your event an unqualified success.
Designed to make life more refined, Zoe will impress at your next meeting, wedding or North Beach social event. When booking your next San Francisco meetings or group events, consider our boutique hotel near North Beach San Francisco in the heart of historic Fisherman's Wharf. We have 2000 square feet of event venues and meeting facilities serviced by expert event planners and in-house caterers. Contact our sales team about our San Francisco hotel best rates and offers.
With 6,500 square feet of meeting space and a beautiful oceanfront setting, Solé Miami delivers memorable corporate meetings, incentive trips, or social Miami events. Solé Miami is located in Sunny Isles, just north of Miami Beach, Florida, on the "Florida Riviera," renowned for sunsets, Latin dance clubs, and world-class shopping. The resort maintains a private beachfront and oceanside swimming pool to keep guests cool.
Here at The Josie we believe in getting the most out of each and every day. The Josie offers the perfect setting for corporate and social events alike. We offer over 1,500 square feet of indoor and outdoor exclusive of event space for every occasion.
With more than 20,000 square feet of flexible event space indoors and out, The Stella Hotel is the premier destination for business meetings and social events in Bryan/College Station. Strategically located in the heart of the Texas A&M Biocorridor just minutes from Easterwood Airport, The Stella Hotel is uniquely equipped to offer the highest level of meeting and event planning in the Bryan/College Station area.


"When I Was His Wife": Miranda Lambert tells the story of the song that paved the way for "Interstate Gospel"
RCA Nashville Miranda Lambert's new album with Pistol Annies is filled with sly references to her divorce from Blake Shelton, in songs like the first single, "Got My Name Changed Back," "Leavers Lullaby," and "When I Was His Wife."
Miranda reveals it was actually "When I Was His Wife" that paved the way for Interstate Gospel, her third album with Ashley Monroe and Angaleena Presley.
"That was the first song we kinda had written in a couple years," Miranda recalls, "so that was the official first song of this project."
"It was cool," she adds. "I think it just set us up to get off and running. It opened the gate."
When Miranda first got the idea for the song, she instantly knew it was one she had to write and sing with Ashley and Angaleena.
"'When I Was His Wife' was an Annies title for sure. It came to me the day we wrote it," she remembers. "I mean, I didn't save it for the Annies. I just started writing it, and I was like, 'Hold on, this is for the girls.'"
"So when I sent it to these girls," Miranda explains, "I just sent the first verse and a chorus, and said, 'Here, I think this is Annies. What do y'all think?' And within literally five minutes I got a verse back from each one, each girl. And it was perfect."
Interstate Gospel is new in stores and online today. Tonight, Pistol Annies play a rare show together at New York City's The Town Hall, before heading to Los Angeles for their Wednesday concert at The Novo.
They're also set to sing at the 52nd CMA Awards on Wednesday, November 14. You can watch for their performance starting at 8 p.m. ET on ABC.


Yo-yo dieting looks something like this: You lose 10 pounds after following a very strict diet like keto, only to gain it all back—and then some—a few months later. Sound familiar? Many people struggle with yo-yo dieting because they get sucked into doing the latest fad diet and end up losing a ton of weight. But when it comes to turning their diet into their lifestyle, they're unable to break bad habits and the pounds begin to pile up again.
"When you lose weight, you lose fat and muscle, but when you gain it back, you gain mostly fat and not muscle. So when you try to lose weight the next time around, it makes it harder to drop the pounds," says Bonnie Taub-Dix, RDN, creator of Better Than Dieting and author of Read It Before You Eat It. "That's because muscle is more efficient at burning calories and losing weight than fat," she explains.
And yo-yo dieting doesn't just affect your ability to lose weight. It can also have negative consequences for your health. Here are all the ways yo-yo dieting can do damage—and what you can do to end its vicious cycle and make healthier choices.
"When people follow very rigid diets, they're skipping meals and eliminating entire food groups. This can cause big dips in blood sugar levels, which can affect appetite, and lead to nutritional imbalances," Taub-Dix says. Those dips in blood sugar can make you crave foods high in fat and sugar, affecting your ability to make healthy food choices. A 2017 study from Nutrition & Diabetes, which followed 4,234 people for 12 years and documented their weight changes, found that the greater the weight fluctuations, the more likely they were to develop type 2 diabetes.
Your resting metabolism—the number of calories you burn just to stay alive—also decreases because the amount of calories you're consuming is so unpredictable that your body keeps what it can, when it can. In addition, your hunger hormones can take a hit, as your body might produce less leptin—the hunger hormone that decreases appetite, Taub-Dix says.
Because you might be limiting certain food groups when you're yo-yo dieting, it can throw your heart through a loop. In fact, a 2017 study from the New England Journal of Medicine suggests that bodyweight fluctuation is a risk factor for death and a coronary event in people with heart disease. For example, following a low-carb diet, like the keto diet, focuses on filling up on fat and protein, but you might be missing key nutrients in vegetables, fruits, and whole grains. Restricting calories for periods of time can also strengthen your cravings for fatty, sugary foods—the worst foods for your heart—and make them seem more rewarding and pleasurable to the brain.
When you're yo-yo dieting, you might be lacking certain nutrients, like iron, which can be lead to a deficiency and cause anemia. A 2014 study from Eat Weight Disorders: Studies on Anorexia, Bulimia and Obesity showed that short-term food restriction—for even as short as two days—can significantly decrease iron concentrations in women. Anemia can occur when you don't produce enough red blood cells that carry oxygen from your lungs to your cells. As a result, you'll feel very tired and weak, have trouble concentrating, and have a rapid heartbeat.
It shouldn't be news that the more sleep-deprived you are, the more likely you are to gain weight. But gorging on sugar-laden snacks before bed or skipping dinner is a recipe for a sleepless night. In fact, going to bed hungry or overstuffed disrupts sleep and can make it hard to stay asleep, Taub-Dix says.
And the less sleep you get, the more your cortisol (the stress hormone) your body will produce, increasing your risk of developing prediabetes and heart disease. So be sure to get at least seven or eight hours of sleep at night; a 2016 study from Oman Medical Journal suggests that getting less than six hours of sleep is associated with type 2 diabetes.
Your gut can take a hit when you go from eating a huge plate of fettuccini to only sipping on celery juice. Normally, your microbiome is home to trillions of healthy bacteria that do everything from boosting your immunity to regulating your metabolism. But yo-yo dieting can create an imbalance of good and bad bacteria, increasing your risk for developing a plethora of health issues.
What's more, gut microbes can play a significant role in post-diet weight gain. A 2016 study done on mice from the Weizmann Institute of Science shows that after a cycle of gaining and losing weight, the mice retained an abnormal "obese" microbiome. Researchers believe that the gut retains a memory of previous obesity, so that's why it's easier to pile on the pounds if you return to the same unhealthy eating habits, even after weight loss.
Even if it means eating that damn cupcake. "You don't have to deprive yourself to lose weight. Make sure you're including the foods you love in your diet. It's all about learning more about yourself and having a better relationship with food," Taub-Dix says. Be sure to also incorporate more exercise into your routine, incorporating a mix of cardio and strength training. Working out can help rev up your metabolism so you lose weight and build muscle, which burns more calories than fat.
Taub-Dix likes to compare yo-yo dieting to owning an apartment versus renting one. "When you treat something like you own it, like your body, you will work hard to keep it healthy and preserve it. But when you treat it like you're renting, you're might not treat it as well," she says. So treat your body like it's truly yours, because it is.
That Was How Yo-Yo Dieting Can Wreck Your Body and Damage Your Health, Hopefully it's useful and you like it.


text:
Govt brushes off Work Choices cheerleader
By Andrea Hayward
June 22, 2011 — 9.26pm
The federal government has dismissed the group calling for review of the Fair Work Act as a Work Choices cheerleader.
The HR Nicholls Society, which former Liberal treasurer Peter Costello was a founding member of in 1986 before entering politics, called on Workplace Relations Minister Chris Evans to confirm a review of the Act set down next year be made public.
The society's president, Adam Bisits, penned a letter to Senator Evans calling on the 2012 review to be made public on Tuesday.
"The question is just one of eight asked of the Senator Evans over the conduct of the review," Mr Bisits said.
"The questions... raise serious question about the operation of the Act and how the review will be conducted."
"The review will need public hearings with the ability of witnesses to furnish information and make written submissions."
A spokesman for Senator Evans said the government would announced details of the review later this year.
"The Labor government does not take direction on industrial relations from the HR Nicholls Society which is aggressively campaigning for a return of Work Choices," the spokesman told AAP.
"Work Choices allowed workers to be stripped of basic entitlements and to be fired for any reason, or no reason at all."
The federal government should immediately release full details of how the review would be conducted and what was being used to assist in the review, Mr Bisits said.
"Concerns about the impact of modern awards on employment and their regulatory burden have been raised with the society as has the lack of binding advice offered by the Fair Work Ombudsman to small businesses," he said.
"Another major concern is whether the review will examine the impact of the FWA on the growing number of long term unemployed and the under utilisation of labour."
Mr Evans' spokesman said the Act provided a balanced framework for delivering fair and productive workplaces adaptable for the challenges of a modern economy.
"All the published data indicates that the Fair Work system is working well, delivering record levels of agreement making while maintaining moderate wages growth, low unemployment; and low levels of industrial disputation."


text:
CPM initiated, VHP Negotiated – Muthalamman Temple unites the people of Uthapuram
Muthalamman Temple unites the people of Uthapuram, Madurai
Uthapuram Dalits enter temple after more than two decades.
S. Sundar, Madurai, Nov. 11, 2011
Courtesy: The Hindu
http://www.thehindu.com/news/states/tamil-nadu/article2615879.ece
The Dalits of Uthapuram village near here, where the 'untouchability' wall was demolished in 2008, on Thursday entered a temple under the control of the upper caste Hindus, with police protection.
Though scores of upper caste Hindus received the 11 Dalit persons outside the temple with folded hands, the scene was marred by the loud wails of women from the nearby streets, who were opposed to the entry of Dalits to their temple.
The Dalits, led by their leaders K. Ponnaiah and Sankaralingam, offered prayers at the Sri Muthalamman, Sri Mariamman temple around 4 p.m.
They offered a garland, coconuts and fruits to the presiding deity.
The priest performed 'puja' and 'deeparathana,' even as Madurai (Rural) Superintendent of Police Asra Garg, along with a huge posse of policemen, waited outside the temple.
The Communist Party of India (Marxist), instrumental in demolishing the wall that divided the Dalits from the upper caste Hindus, hailed the temple entry as a "historic" event.
"We are entering the temple premises for the first time after 1989," said Mr. Ponnaiah.
The Dalits used to offer prayers at the peepul tree on the temple premises during the festival of the Karuppasamy temple (belonging to the Dalits).
The devotees, who perform the role of Lord Karuppasamy, Vairavan and Agni, used to go around the peepul tree as a ritual.
"Our belief is that the ritual will keep the evils out of our village. But it was stopped after people threw stones at us during the festival in 1989," he said. Since then, there were clashes between the two groups, followed by the construction of the wall.
After the CPI(M) and the Tamil Nadu Untouchability Eradication Front (TNUEF) took up the issue, the district administration demolished the wall. However, tension prevailed in the village and a permanent police picket was posted.
Meanwhile, Vishwa Hindu Parishad district president Chinmaya Somasundaram and his long-time friend and former Aavin general manager K. Athimoolam, who had relatives on both sides, began fresh negotiations between the Dalits and the upper caste Hindus.
"After nearly two months of talks, we were able to bring peace. This [the temple entry] has been the demand of the Dalits for nearly seven decades," Mr. Somasundaram said. The SP offered all possible help to further the talks.
An agreement was reached on October 20. "This is only a symbolic entry. Things are not going to change overnight. But it is good that people from both sides have come to a meeting point," Mr. Garg said. He said more than 50 criminal cases booked against members of both parties would be withdrawn. However, the police picket would continue.
Mr. Athimoolam said the Dalits would be allowed to offer worship at the peepul tree after a ritual to reverse a "promise" made by the caste Hindus in 1989 is performed.
Kumbabhishekam
The temple 'Kumbabhishekam' would be performed soon, and the upper caste people would invite the Dalits for it. They also planned to hold a common feast on the occasion, Mr. Somasundaram said.
Appreciating the caste Hindus for allowing the Dalits into the temple, TNUEF State president P. Sampath said Uthapuram was no longer a symbol of untouchability. "It has become the symbol of eradication of untouchability." This would give an impetus to the Dalits of the State who are being denied the right to worship.
Missionaries are perfect nuisances and leave every place worse than they found it. - Charles Dickens


Interesting study that is relevant for the aging research.
One of the co-author has shared publications.
In this interesting study, the authors replicated the use of the paradigm testing-the-limits paradigm (Digit Symbol Substitution Test- DSST) in a group of 136 healthy elderly subjects (age range: 60–75 years) with high level of education (≥13 years of schooling). This mentally challenging task is considered to assess Cognitive Reserve (CR) in a dynamic way. Additionally, the authors assessed several cognitive and non cognitive variables that contribute to, or interact with CR, as cognitive multitasking, verbal learning and long-term memory, verbal short-term and working memory, information processing speed/attention and cognitive flexibility, interference, verbal fluency, visual problem-solving, and reading performance and psychological variables as mood, social and physical activities, sleep quality, and well-being.
The authors in their introduction consider that it is important to demonstrate that the DSST is a valid and reliable measure of the CR, and should be reproduced. While I strongly agree with this assertion, the authors had already applied this instrument in a similar population (N=140, age 57–74 yrs, M = 67.27, SD = 4.16, >13 years education, see Zihl J et al. PLoS One. 2014;9: e84590). The use of a high selected healthy elderly group (with high educational level) was possibly related with the observed lack of association between CR and the non-cognitive variables assessed with this study. While the authors reflect this in the discussion, these should also be justified in the introduction section.
1) The authors acknowledge that "All corresponding p-values reported are Bonferroni-corrected due to multiple comparisons, with significance level set at α = .05". These Bonferroni corrections are not clear in the data presented (eg., report significant data with p=.05 – see table 2).
2) Considering the relations between psychological variables and cognitive variables, between cognitive variables and CR, as well as between CR and both cognitive and psychological variables, a moderation/mediation analysis should be also investigated.
3) As the authors report that there was no evidence that psychological measures were influenced by aging, the same should be reported for cognitive measures.
4) The authors could provide the data showing that "comparison of high and low performers in this study revealed higher performance in measures of cognitive architecture in subjects with higher mood scores and higher engagement in leisure activities, supporting the view that mood and cognitive lifestyle are key determinants of cognitive performance in healthy older " page 6, if we consider that no significant differences were found in psychological measures obtained from low and high performers (results section) – page 5.
suggestions, which we have considered in our revision.
1. It is now stated more clearly in the text how the Bonferroni correction was applied.
4. The have changed the section on the comparison of high and low performers accordingly.


Our walk-run events are held at RecPlex, the Largest Municipal Recreation Facility in America. The RecPlex is located on the shores of Lake Andrea in the 425-acre Prairie Springs Park in Pleasant Prairie, WI. Pleasant Prairie is in southeastern Wisconsin, between Milwaukee & Chicago, approximately 1.5 miles east of I-94 at the HWY 165 exit. This is the exit closest to the Illinois state line.
Our 5Ks and 10ks start and finish at the Beach Pavilion on the west side of Lake Andrea. The race takes place on the paved running path around Lake Andrea, with a section on the Prairie Farms trail (gravel/limestone). The 10k course will fully utilize the Prairie Farms trailDay-of registration is available from 8:00-8:30am in the Pavilion building. Race starts promptly at 9:00am. Free parking is in the lot south of the Beach Pavilion.
Online registration closes at 11pm the Thursday before the race.
Is only available day of the race 60-30 minutes prior to the start of the race.


text:
#include <rtthread.h>
#include <drivers/usb_host.h>

#define USB_THREAD_STACK_SIZE    4096

static struct rt_messagequeue *usb_mq;
static struct uclass_driver hub_driver;
static struct uhub root_hub;

static rt_err_t root_hub_ctrl(struct uhcd *hcd, rt_uint16_t port, rt_uint8_t cmd, void *args)
{
    switch(cmd)
    {
    case RH_GET_PORT_STATUS:
        (*(rt_uint32_t *)args) = hcd->roothub->port_status[port-1];
        break;
    case RH_SET_PORT_STATUS:
        hcd->roothub->port_status[port-1] = (*(rt_uint32_t *)args);
        break;
    case RH_CLEAR_PORT_FEATURE:
        switch(((rt_uint32_t)args))
        {
        case PORT_FEAT_C_CONNECTION:
            hcd->roothub->port_status[port-1] &= ~PORT_CCSC;
            break;
        case PORT_FEAT_C_ENABLE:
            hcd->roothub->port_status[port-1] &= ~PORT_PESC;
            break;
        case PORT_FEAT_C_SUSPEND:
            hcd->roothub->port_status[port-1] &= ~PORT_PSSC;
            break;
        case PORT_FEAT_C_OVER_CURRENT:
            hcd->roothub->port_status[port-1] &= ~PORT_POCIC;
            break;
        case PORT_FEAT_C_RESET:
            hcd->roothub->port_status[port-1] &= ~PORT_PRSC;
            break;
        }
        break;
    case RH_SET_PORT_FEATURE:
        switch((rt_uint32_t)args)
        {
        case PORT_FEAT_CONNECTION:
            hcd->roothub->port_status[port-1] |= PORT_CCSC;
            break;
        case PORT_FEAT_ENABLE:
            hcd->roothub->port_status[port-1] |= PORT_PESC;
            break;
        case PORT_FEAT_SUSPEND:
            hcd->roothub->port_status[port-1] |= PORT_PSSC;
            break;
        case PORT_FEAT_OVER_CURRENT:
            hcd->roothub->port_status[port-1] |= PORT_POCIC;
            break;
        case PORT_FEAT_RESET:
            hcd->ops->reset_port(port);
            break;
        case PORT_FEAT_POWER:
            break;
        case PORT_FEAT_LOWSPEED:
            break;
        case PORT_FEAT_HIGHSPEED:
            break;
        }
        break;
    default:
        return RT_ERROR;
    }
    return RT_EOK;
}
void rt_usbh_root_hub_connect_handler(struct uhcd *hcd, rt_uint8_t port, rt_bool_t isHS)
{
    struct uhost_msg msg;
    msg.type = USB_MSG_CONNECT_CHANGE;
    msg.content.hub = hcd->roothub;
    hcd->roothub->port_status[port - 1] |= PORT_CCS | PORT_CCSC;
    if(isHS)
    {
        hcd->roothub->port_status[port - 1] &= ~PORT_LSDA;
    }
    else
    {
        hcd->roothub->port_status[port - 1] |= PORT_LSDA;
    }
    rt_usbh_event_signal(&msg);
}

void rt_usbh_root_hub_disconnect_handler(struct uhcd *hcd, rt_uint8_t port)
{
    struct uhost_msg msg;
    msg.type = USB_MSG_CONNECT_CHANGE;
    msg.content.hub = hcd->roothub;
    hcd->roothub->port_status[port - 1] |= PORT_CCSC;
    hcd->roothub->port_status[port - 1] &= ~PORT_CCS;
    rt_usbh_event_signal(&msg);
}

/**
 * This function will do USB_REQ_GET_DESCRIPTOR bRequest for the device instance
 * to get usb hub descriptor.
 *
 * @param intf the interface instance.
 * @buffer the data buffer to save usb hub descriptor.
 * @param nbytes the size of buffer
 *
 * @return the error code, RT_EOK on successfully.
 */
rt_err_t rt_usbh_hub_get_descriptor(struct uinstance* device, rt_uint8_t *buffer, rt_size_t nbytes)
{
    struct urequest setup;
    int timeout = USB_TIMEOUT_BASIC;

    /* parameter check */
    RT_ASSERT(device != RT_NULL);

    setup.request_type = USB_REQ_TYPE_DIR_IN | USB_REQ_TYPE_CLASS | USB_REQ_TYPE_DEVICE;
    setup.bRequest = USB_REQ_GET_DESCRIPTOR;
    setup.wIndex = 0;
    setup.wLength = nbytes;
    setup.wValue = USB_DESC_TYPE_HUB << 8;

    if(rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8)
    {
        if(rt_usb_hcd_pipe_xfer(device->hcd, device->pipe_ep0_in, buffer, nbytes, timeout) == nbytes)
        {
            return RT_EOK;
        }
    }
    return -RT_FALSE;
}

/**
 * This function will do USB_REQ_GET_STATUS bRequest for the device instance
 * to get usb hub status.
 *
 * @param intf the interface instance.
 * @buffer the data buffer to save usb hub status.
 *
 * @return the error code, RT_EOK on successfully.
 */
rt_err_t rt_usbh_hub_get_status(struct uinstance* device, rt_uint32_t* buffer)
{
    struct urequest setup;
    int timeout = USB_TIMEOUT_BASIC;

    /* parameter check */
    RT_ASSERT(device != RT_NULL);

    setup.request_type = USB_REQ_TYPE_DIR_IN | USB_REQ_TYPE_CLASS | USB_REQ_TYPE_DEVICE;
    setup.bRequest = USB_REQ_GET_STATUS;
    setup.wIndex = 0;
    setup.wLength = 4;
    setup.wValue = 0;
    if(rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8)
    {
        if(rt_usb_hcd_pipe_xfer(device->hcd, device->pipe_ep0_in, buffer, 4, timeout) == 4)
        {
            return RT_EOK;
        }
    }
    return -RT_FALSE;
}

/**
 * This function will do USB_REQ_GET_STATUS bRequest for the device instance
 * to get hub port status.
 *
 * @param intf the interface instance.
 * @port the hub port to get status.
 * @buffer the data buffer to save usb hub status.
 *
 * @return the error code, RT_EOK on successfully.
 */
rt_err_t rt_usbh_hub_get_port_status(uhub_t hub, rt_uint16_t port, rt_uint32_t* buffer)
{
    struct urequest setup;
    int timeout = USB_TIMEOUT_BASIC;

    /* parameter check */
    RT_ASSERT(hub != RT_NULL);

    /* get roothub port status */
    if(hub->is_roothub)
    {
        root_hub_ctrl(hub->hcd, port, RH_GET_PORT_STATUS,
            (void*)buffer);
        return RT_EOK;
    }

    setup.request_type = USB_REQ_TYPE_DIR_IN | USB_REQ_TYPE_CLASS | USB_REQ_TYPE_OTHER;
    setup.bRequest = USB_REQ_GET_STATUS;
    setup.wIndex = port;
    setup.wLength = 4;
    setup.wValue = 0;

    if(rt_usb_hcd_setup_xfer(hub->hcd, hub->self->pipe_ep0_out, &setup, timeout) == 8)
    {
        if(rt_usb_hcd_pipe_xfer(hub->hcd, hub->self->pipe_ep0_in, buffer, 4, timeout) == 4)
        {
            return RT_EOK;
        }
    }
    return -RT_FALSE;
}

/**
 * This function will do USB_REQ_CLEAR_FEATURE bRequest for the device instance
 * to clear feature of the hub port.
 *
 * @param intf the interface instance.
 * @port the hub port.
 * @feature feature to be cleared.
 *
 * @return the error code, RT_EOK on successfully.
 */
rt_err_t rt_usbh_hub_clear_port_feature(uhub_t hub, rt_uint16_t port, rt_uint16_t feature)
{
    struct urequest setup;
    int timeout = USB_TIMEOUT_BASIC;

    /* parameter check */
    RT_ASSERT(hub != RT_NULL);

    /* clear roothub feature */
    if(hub->is_roothub)
    {
        root_hub_ctrl(hub->hcd, port, RH_CLEAR_PORT_FEATURE,
            (void*)(rt_uint32_t)feature);
        return RT_EOK;
    }

    setup.request_type = USB_REQ_TYPE_DIR_OUT | USB_REQ_TYPE_CLASS |
        USB_REQ_TYPE_OTHER;
    setup.bRequest = USB_REQ_CLEAR_FEATURE;
    setup.wIndex = port;
    setup.wLength = 0;
    setup.wValue = feature;

    if(rt_usb_hcd_setup_xfer(hub->hcd, hub->self->pipe_ep0_out, &setup, timeout) == 8)
    {
        return RT_EOK;
    }
    return -RT_FALSE;
}

/**
 * This function will do USB_REQ_SET_FEATURE bRequest for the device instance
 * to set feature of the hub port.
 *
 * @param intf the interface instance.
 * @port the hub port.
 * @feature feature to be set.
 *
 * @return the error code, RT_EOK on successfully.
 */
rt_err_t rt_usbh_hub_set_port_feature(uhub_t hub, rt_uint16_t port,
    rt_uint16_t feature)
{
    struct urequest setup;
    int timeout = USB_TIMEOUT_BASIC;

    /* parameter check */
    RT_ASSERT(hub != RT_NULL);

    /* clear roothub feature */
    if(hub->is_roothub)
    {
        root_hub_ctrl(hub->hcd, port, RH_SET_PORT_FEATURE,
            (void*)(rt_uint32_t)feature);
        return RT_EOK;
    }

    setup.request_type = USB_REQ_TYPE_DIR_OUT | USB_REQ_TYPE_CLASS |
        USB_REQ_TYPE_OTHER;
    setup.bRequest = USB_REQ_SET_FEATURE;
    setup.wIndex = port;
    setup.wLength = 0;
    setup.wValue = feature;

    if(rt_usb_hcd_setup_xfer(hub->hcd, hub->self->pipe_ep0_out, &setup, timeout) == 8)
    {
        return RT_EOK;
    }
    else return -RT_FALSE;
}

/**
 * This function will rest hub port, it is invoked when sub device attached to the hub port.
 *
 * @param intf the interface instance.
 * @param port the hub port.
 *
 * @return the error code, RT_EOK on successfully.
 */
rt_err_t rt_usbh_hub_reset_port(uhub_t hub, rt_uint16_t port)
{
    rt_err_t ret;
    rt_uint32_t pstatus;

    /* parameter check */
    RT_ASSERT(hub != RT_NULL);

    rt_thread_delay(50);

    /* reset hub port */
    ret = rt_usbh_hub_set_port_feature(hub, port, PORT_FEAT_RESET);
    if(ret != RT_EOK) return ret;

    while(1)
    {
        ret = rt_usbh_hub_get_port_status(hub, port, &pstatus);
        if(!(pstatus & PORT_PRS)) break;
    }

    /* clear port reset feature */
    ret = rt_usbh_hub_clear_port_feature(hub, port, PORT_FEAT_C_RESET);
    if(ret != RT_EOK) return ret;

    rt_thread_delay(50);

    return RT_EOK;
}

/**
 * This function will do debouce, it is invoked when sub device attached to the hub port.
 *
 * @param device the usb instance.
 * @param port the hub port.
 *
 * @return the error code, RT_EOK on successfully.
 */
rt_err_t rt_usbh_hub_port_debounce(uhub_t hub, rt_uint16_t port)
{
    rt_err_t ret;
    int i = 0, times = 20;
    rt_uint32_t pstatus;
    rt_bool_t connect = RT_TRUE;
    int delayticks = USB_DEBOUNCE_TIME / times;
    if (delayticks < 1)
        delayticks = 1;

    /* parameter check */
    RT_ASSERT(hub != RT_NULL);

    for(i=0; i<times; i++)
    {
        ret = rt_usbh_hub_get_port_status(hub, port, &pstatus);
        if(ret != RT_EOK) return ret;

        if(!(pstatus & PORT_CCS))
        {
            connect = RT_FALSE;
            break;
        }

        rt_thread_delay(delayticks);
    }

    if(connect) return RT_EOK;
    else return -RT_ERROR;
}

/**
 * This function will poll all the hub ports to detect port status, especially connect and
 * disconnect events.
 *
 * @param intf the interface instance.
 *
 * @return the error code, RT_EOK on successfully.
 */
static rt_err_t rt_usbh_hub_port_change(uhub_t hub)
{
    int i;
    rt_bool_t reconnect;

    /* parameter check */
    RT_ASSERT(hub != RT_NULL);

    /* get usb device instance */
    for (i = 0; i < hub->num_ports; i++)
    {
        rt_err_t ret;
        struct uinstance* device;
        rt_uint32_t pstatus = 0;

        reconnect = RT_FALSE;

        /* get hub port status */
        ret = rt_usbh_hub_get_port_status(hub, i + 1, &pstatus);
        if(ret != RT_EOK) continue;

        RT_DEBUG_LOG(RT_DEBUG_USB, ("port %d status 0x%x\n", i + 1, pstatus));

        /* check port status change */
        if (pstatus & PORT_CCSC)
        {
            /* clear port status change feature */
            rt_usbh_hub_clear_port_feature(hub, i + 1, PORT_FEAT_C_CONNECTION);
            reconnect = RT_TRUE;
        }

        if(pstatus & PORT_PESC)
        {
            rt_usbh_hub_clear_port_feature(hub, i + 1, PORT_FEAT_C_ENABLE);
            reconnect = RT_TRUE;
        }

        if(reconnect)
        {
            if(hub->child[i] != RT_NULL && hub->child[i]->status != DEV_STATUS_IDLE)
                rt_usbh_detach_instance(hub->child[i]);

            ret = rt_usbh_hub_port_debounce(hub, i + 1);
            if(ret != RT_EOK) continue;

            /* allocate an usb instance for new connected device */
            device = rt_usbh_alloc_instance(hub->hcd);
            if(device == RT_NULL) break;

            /* set usb device speed */
            device->speed = (pstatus & PORT_LSDA) ? 1 : 0;
            device->parent_hub = hub;
            device->hcd = hub->hcd;
            device->port = i + 1;
            hub->child[i] = device;

            /* reset usb roothub port */
            rt_usbh_hub_reset_port(hub, i + 1);

            /* attatch the usb instance to the hcd */
            rt_usbh_attatch_instance(device);
        }
    }

    return RT_EOK;
}

/**
 * This function is the callback function of hub's int endpoint, it is invoked when data comes.
 *
 * @param context the context of the callback function.
 *
 * @return none.
 */
static void rt_usbh_hub_irq(void* context)
{
    upipe_t pipe;
    uhub_t hub;
    int timeout = USB_TIMEOUT_BASIC;

    RT_ASSERT(context != RT_NULL);

    pipe = (upipe_t)context;
    hub = (uhub_t)pipe->user_data;

    if(pipe->status != UPIPE_STATUS_OK)
    {
        RT_DEBUG_LOG(RT_DEBUG_USB,("hub irq error\n"));
        return;
    }

    rt_usbh_hub_port_change(hub);

    RT_DEBUG_LOG(RT_DEBUG_USB,("hub int xfer...\n"));

    /* parameter check */
     RT_ASSERT(pipe->inst->hcd != RT_NULL);

    rt_usb_hcd_pipe_xfer(hub->self->hcd, pipe, hub->buffer, pipe->ep.wMaxPacketSize, timeout);
}

/**
 * This function will run usb hub class driver when usb hub is detected and identified
 * as a hub class device, it will continue to do the enumulate process.
 *
 * @param arg the argument.
 *
 * @return the error code, RT_EOK on successfully.
 */

static rt_err_t rt_usbh_hub_enable(void *arg)
{
    int i = 0;
    rt_err_t ret = RT_EOK;
    uep_desc_t ep_desc = RT_NULL;
    uhub_t hub;
    struct uinstance* device;
    struct uhintf* intf = (struct uhintf*)arg;
    upipe_t pipe_in = RT_NULL;
    int timeout = USB_TIMEOUT_LONG;
    /* paremeter check */
    RT_ASSERT(intf != RT_NULL);

    RT_DEBUG_LOG(RT_DEBUG_USB, ("rt_usbh_hub_run\n"));

    /* get usb device instance */
    device = intf->device;

    /* create a hub instance */
    hub = rt_malloc(sizeof(struct uhub));
    rt_memset(hub, 0, sizeof(struct uhub));

    /* make interface instance's user data point to hub instance */
    intf->user_data = (void*)hub;

    /* get hub descriptor head */
    ret = rt_usbh_hub_get_descriptor(device, (rt_uint8_t*)&hub->hub_desc, 8);
    if(ret != RT_EOK)
    {
        rt_kprintf("get hub descriptor failed\n");
        return -RT_ERROR;
    }

    /* get full hub descriptor */
    ret = rt_usbh_hub_get_descriptor(device, (rt_uint8_t*)&hub->hub_desc,
        hub->hub_desc.length);
    if(ret != RT_EOK)
    {
        rt_kprintf("get hub descriptor again failed\n");
        return -RT_ERROR;
    }

    /* get hub ports number */
    hub->num_ports = hub->hub_desc.num_ports;
    hub->hcd = device->hcd;
    hub->self = device;

    /* reset all hub ports */
    for (i = 0; i < hub->num_ports; i++)
    {
        rt_usbh_hub_set_port_feature(hub, i + 1, PORT_FEAT_POWER);
        rt_thread_delay(hub->hub_desc.pwron_to_good
            * 2 * RT_TICK_PER_SECOND / 1000 );
    }

    if(intf->intf_desc->bNumEndpoints != 1)
        return -RT_ERROR;

    /* get endpoint descriptor from interface descriptor */
    rt_usbh_get_endpoint_descriptor(intf->intf_desc, 0, &ep_desc);
    if(ep_desc == RT_NULL)
    {
        rt_kprintf("rt_usb_get_endpoint_descriptor error\n");
        return -RT_ERROR;
    }

    /* the endpoint type of hub class should be interrupt */
    if( USB_EP_ATTR(ep_desc->bmAttributes) == USB_EP_ATTR_INT)
    {
        /* the endpoint direction of hub class should be in */
        if(ep_desc->bEndpointAddress & USB_DIR_IN)
        {
            /* allocate a pipe according to the endpoint type */
            pipe_in = rt_usb_instance_find_pipe(device,ep_desc->bEndpointAddress);
            if(pipe_in == RT_NULL)
            {
                return RT_ERROR;
            }
            rt_usb_pipe_add_callback(pipe_in,rt_usbh_hub_irq);
        }
        else return -RT_ERROR;
    }

    /* parameter check */
    RT_ASSERT(device->hcd != RT_NULL);
    pipe_in->user_data = hub;
    rt_usb_hcd_pipe_xfer(hub->hcd, pipe_in, hub->buffer,
        pipe_in->ep.wMaxPacketSize, timeout);
    return RT_EOK;
}

/**
 * This function will be invoked when usb hub plug out is detected and it would clean
 * and release all hub class related resources.
 *
 * @param arg the argument.
 *
 * @return the error code, RT_EOK on successfully.
 */
static rt_err_t rt_usbh_hub_disable(void* arg)
{
    int i;
    uhub_t hub;
    struct uhintf* intf = (struct uhintf*)arg;

    /* paremeter check */
    RT_ASSERT(intf != RT_NULL);

    RT_DEBUG_LOG(RT_DEBUG_USB, ("rt_usbh_hub_stop\n"));
    hub = (uhub_t)intf->user_data;

    for(i=0; i<hub->num_ports; i++)
    {
        if(hub->child[i] != RT_NULL)
            rt_usbh_detach_instance(hub->child[i]);
    }

    if(hub != RT_NULL) rt_free(hub);
    if(intf != RT_NULL) rt_free(intf);

    return RT_EOK;
}

/**
 * This function will register hub class driver to the usb class driver manager.
 * and it should be invoked in the usb system initialization.
 *
 * @return the error code, RT_EOK on successfully.
 */
ucd_t rt_usbh_class_driver_hub(void)
{
    hub_driver.class_code = USB_CLASS_HUB;

    hub_driver.enable = rt_usbh_hub_enable;
    hub_driver.disable = rt_usbh_hub_disable;

    return &hub_driver;
}

/**
 * This function is the main entry of usb hub thread, it is in charge of
 * processing all messages received from the usb message buffer.
 *
 * @param parameter the parameter of the usb host thread.
 *
 * @return none.
 */
static void rt_usbh_hub_thread_entry(void* parameter)
{
    while(1)
    {
        struct uhost_msg msg;

        /* receive message */
        if(rt_mq_recv(usb_mq, &msg, sizeof(struct uhost_msg), RT_WAITING_FOREVER)
            != RT_EOK ) continue;

        //RT_DEBUG_LOG(RT_DEBUG_USB, ("msg type %d\n", msg.type));

        switch (msg.type)
        {
        case USB_MSG_CONNECT_CHANGE:
            rt_usbh_hub_port_change(msg.content.hub);
            break;
        case USB_MSG_CALLBACK:
            /* invoke callback */
            msg.content.cb.function(msg.content.cb.context);
            break;
        default:
            break;
        }
    }
}

/**
 * This function will post an message to the usb message queue,
 *
 * @param msg the message to be posted
 *
 * @return the error code, RT_EOK on successfully.
 */
rt_err_t rt_usbh_event_signal(struct uhost_msg* msg)
{
    RT_ASSERT(msg != RT_NULL);

    /* send message to usb message queue */
    rt_mq_send(usb_mq, (void*)msg, sizeof(struct uhost_msg));

    return RT_EOK;
}

/**
 * This function will initialize usb hub thread.
 *
 * @return none.
 *
 */
void rt_usbh_hub_init(uhcd_t hcd)
{
    rt_thread_t thread;
    /* link root hub to hcd */
    root_hub.is_roothub = RT_TRUE;
    hcd->roothub = &root_hub;
    root_hub.hcd = hcd;
    root_hub.num_ports = hcd->num_ports;
    /* create usb message queue */
    usb_mq = rt_mq_create("usbh", 32, 16, RT_IPC_FLAG_FIFO);

    /* create usb hub thread */
    thread = rt_thread_create("usbh", rt_usbh_hub_thread_entry, RT_NULL,
        USB_THREAD_STACK_SIZE, 8, 20);
    if(thread != RT_NULL)
    {
        /* startup usb host thread */
        rt_thread_startup(thread);
    }
}

redpajama_set_name: RedPajamaGithub