text:
<?php
/**
 * Storefront template functions.
 *
 * @package storefront
 */

if ( ! function_exists( 'storefront_display_comments' ) ) {
	/**
	 * Storefront display comments
	 *
	 * @since  1.0.0
	 */
	function storefront_display_comments() {
		// If comments are open or we have at least one comment, load up the comment template.
		if ( comments_open() || '0' != get_comments_number() ) :
			comments_template();
		endif;
	}
}

if ( ! function_exists( 'storefront_comment' ) ) {
	/**
	 * Storefront comment template
	 *
	 * @param array $comment the comment array.
	 * @param array $args the comment args.
	 * @param int   $depth the comment depth.
	 * @since 1.0.0
	 */
	function storefront_comment( $comment, $args, $depth ) {
		if ( 'div' == $args['style'] ) {
			$tag = 'div';
			$add_below = 'comment';
		} else {
			$tag = 'li';
			$add_below = 'div-comment';
		}
		?>
		<<?php echo esc_attr( $tag ); ?> <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ) ?> id="comment-<?php comment_ID() ?>">

			<?php echo get_avatar( $comment, 128 ); ?>
			<?php printf( wp_kses_post( '%s', 'storefront' ), get_comment_author_link() ); ?>

			<?php if ( '0' == $comment->comment_approved ) : ?>
				<?php esc_attr_e( 'Your comment is awaiting moderation.', 'storefront' ); ?>

			<?php endif; ?>

			<a href="<?php echo esc_url( htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ); ?>" class="comment-date">
				<?php echo '<time datetime="' . get_comment_date( 'c' ) . '">' . get_comment_date() . '</time>'; ?>

		<?php if ( 'div' != $args['style'] ) : ?>
		<div id="div-comment-<?php comment_ID() ?>" class="comment-content">
		<?php endif; ?>

		<?php comment_text(); ?>

		<?php comment_reply_link( array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
		<?php edit_comment_link( __( 'Edit', 'storefront' ), '  ', '' ); ?>

		<?php if ( 'div' != $args['style'] ) : ?>

		<?php endif; ?>
	<?php
	}
}

if ( ! function_exists( 'storefront_footer_widgets' ) ) {
	/**
	 * Display the footer widget regions.
	 *
	 * @since  1.0.0
	 * @return void
	 */
	function storefront_footer_widgets() {
		$rows    = intval( apply_filters( 'storefront_footer_widget_rows', 1 ) );
		$regions = intval( apply_filters( 'storefront_footer_widget_columns', 4 ) );

		for ( $row = 1; $row <= $rows; $row++ ) :

			// Defines the number of active columns in this footer row.
			for ( $region = $regions; 0 < $region; $region-- ) {
				if ( is_active_sidebar( 'footer-' . strval( $region + $regions * ( $row - 1 ) ) ) ) {
					$columns = $region;
					break;
				}
			}

			if ( isset( $columns ) ) : ?>
				<div class=<?php echo '"footer-widgets row-' . strval( $row ) . ' col-' . strval( $columns ) . ' fix"'; ?>><?php

					for ( $column = 1; $column <= $columns; $column++ ) :
						$footer_n = $column + $regions * ( $row - 1 );

						if ( is_active_sidebar( 'footer-' . strval( $footer_n ) ) ) : ?>

							<div class="block footer-widget-<?php echo strval( $column ); ?>">
								<?php dynamic_sidebar( 'footer-' . strval( $footer_n ) ); ?>

<?php

						endif;
					endfor; ?>

<?php

				unset( $columns );
			endif;
		endfor;
	}
}

if ( ! function_exists( 'storefront_credit' ) ) {
	/**
	 * Display the theme credit
	 *
	 * @since  1.0.0
	 * @return void
	 */
	function storefront_credit() {
		?>

			<?php echo esc_html( apply_filters( 'storefront_copyright_text', $content = '© ' . get_bloginfo( 'name' ) . ' ' . date( 'Y' ) ) ); ?>
			<?php if ( apply_filters( 'storefront_credit_link', true ) ) { ?>

 <?php echo '' . esc_html__( 'Built with Storefront & WooCommerce', 'storefront' ) . '' ?>
			<?php } ?>

		<?php
	}
}

if ( ! function_exists( 'storefront_header_widget_region' ) ) {
	/**
	 * Display header widget region
	 *
	 * @since  1.0.0
	 */
	function storefront_header_widget_region() {
		if ( is_active_sidebar( 'header-1' ) ) {
		?>

				<?php dynamic_sidebar( 'header-1' ); ?>

		<?php
		}
	}
}

if ( ! function_exists( 'storefront_site_branding' ) ) {
	/**
	 * Site branding wrapper and display
	 *
	 * @since  1.0.0
	 * @return void
	 */
	function storefront_site_branding() {
		?>

			<?php storefront_site_title_or_logo(); ?>

		<?php
	}
}

if ( ! function_exists( 'storefront_site_title_or_logo' ) ) {
	/**
	 * Display the site title or logo
	 *
	 * @since 2.1.0
	 * @param bool $echo Echo the string or return it.
	 * @return string
	 */
	function storefront_site_title_or_logo( $echo = true ) {
		if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
			$logo = get_custom_logo();
			$html = is_home() ? '
' . $logo . '
' : $logo;
		} elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
			// Copied from jetpack_the_site_logo() function.
			$logo    = site_logo()->logo;
			$logo_id = get_theme_mod( 'custom_logo' ); // Check for WP 4.5 Site Logo
			$logo_id = $logo_id ? $logo_id : $logo['id']; // Use WP Core logo if present, otherwise use Jetpack's.
			$size    = site_logo()->theme_size();
			$html    = sprintf( '%2$s',
				esc_url( home_url( '/' ) ),
				wp_get_attachment_image(
					$logo_id,
					$size,
					false,
					array(
						'class'     => 'site-logo attachment-' . $size,
						'data-size' => $size,
						'itemprop'  => 'logo'
					)
				)
			);

			$html = apply_filters( 'jetpack_the_site_logo', $html, $logo, $size );
		} else {
			$tag = is_home() ? 'h1' : 'div';

			$html = '<' . esc_attr( $tag ) . ' class="beta site-title">' . esc_html( get_bloginfo( 'name' ) ) . '</' . esc_attr( $tag ) .'>';

			if ( '' !== get_bloginfo( 'description' ) ) {
				$html .= '
' . esc_html( get_bloginfo( 'description', 'display' ) ) . '
';
			}
		}

		if ( ! $echo ) {
			return $html;
		}

		echo $html;
	}
}

if ( ! function_exists( 'storefront_primary_navigation' ) ) {
	/**
	 * Display Primary Navigation
	 *
	 * @since  1.0.0
	 * @return void
	 */
	function storefront_primary_navigation() {
		?>
		<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_html_e( 'Primary Navigation', 'storefront' ); ?>">
		<button class="menu-toggle" aria-controls="site-navigation" aria-expanded="false"><?php echo esc_attr( apply_filters( 'storefront_menu_toggle_text', __( 'Menu', 'storefront' ) ) ); ?></button>
			<?php
			wp_nav_menu(
				array(
					'theme_location'	=> 'primary',
					'container_class'	=> 'primary-navigation',
					)
			);

			wp_nav_menu(
				array(
					'theme_location'	=> 'handheld',
					'container_class'	=> 'handheld-navigation',
					)
			);
			?>

		<?php
	}
}

if ( ! function_exists( 'storefront_secondary_navigation' ) ) {
	/**
	 * Display Secondary Navigation
	 *
	 * @since  1.0.0
	 * @return void
	 */
	function storefront_secondary_navigation() {
	    if ( has_nav_menu( 'secondary' ) ) {
		    ?>
		    <nav class="secondary-navigation" role="navigation" aria-label="<?php esc_html_e( 'Secondary Navigation', 'storefront' ); ?>">
			    <?php
				    wp_nav_menu(
					    array(
						    'theme_location'	=> 'secondary',
						    'fallback_cb'		=> '',
					    )
				    );
			    ?>

		    <?php
		}
	}
}

if ( ! function_exists( 'storefront_skip_links' ) ) {
	/**
	 * Skip links
	 *
	 * @since  1.4.1
	 * @return void
	 */
	function storefront_skip_links() {
		?>
		<?php esc_attr_e( 'Skip to navigation', 'storefront' ); ?>
		<?php esc_attr_e( 'Skip to content', 'storefront' ); ?>
		<?php
	}
}

if ( ! function_exists( 'storefront_homepage_header' ) ) {
	/**
	 * Display the page header without the featured image
	 *
	 * @since 1.0.0
	 */
	function storefront_homepage_header() {
		edit_post_link( __( 'Edit this section', 'storefront' ), '', '', '', 'button storefront-hero__button-edit' );
		?>

			<?php
			the_title( '
', '
' );
			?>

		<?php
	}
}

if ( ! function_exists( 'storefront_page_header' ) ) {
	/**
	 * Display the page header
	 *
	 * @since 1.0.0
	 */
	function storefront_page_header() {
		?>

			<?php
			storefront_post_thumbnail( 'full' );
			the_title( '
', '
' );
			?>

		<?php
	}
}

if ( ! function_exists( 'storefront_page_content' ) ) {
	/**
	 * Display the post content
	 *
	 * @since 1.0.0
	 */
	function storefront_page_content() {
		?>

			<?php the_content(); ?>
			<?php
				wp_link_pages( array(
					'before' => '
' . __( 'Pages:', 'storefront' ),
					'after'  => '
',
				) );
			?>

		<?php
	}
}

if ( ! function_exists( 'storefront_post_header' ) ) {
	/**
	 * Display the post header with a link to the single post
	 *
	 * @since 1.0.0
	 */
	function storefront_post_header() {
		?>

		<?php
		if ( is_single() ) {
			storefront_posted_on();
			the_title( '
', '
' );
		} else {
			if ( 'post' == get_post_type() ) {
				storefront_posted_on();
			}

			the_title( sprintf( '
', esc_url( get_permalink() ) ), '
' );
		}
		?>

		<?php
	}
}

if ( ! function_exists( 'storefront_post_content' ) ) {
	/**
	 * Display the post content with a link to the single post
	 *
	 * @since 1.0.0
	 */
	function storefront_post_content() {
		?>

		<?php

		/**
		 * Functions hooked in to storefront_post_content_before action.
		 *
		 * @hooked storefront_post_thumbnail - 10
		 */
		do_action( 'storefront_post_content_before' );

		the_content(
			sprintf(
				__( 'Continue reading %s', 'storefront' ),
				'' . get_the_title() . ''
			)
		);

		do_action( 'storefront_post_content_after' );

		wp_link_pages( array(
			'before' => '
' . __( 'Pages:', 'storefront' ),
			'after'  => '
',
		) );
		?>

		<?php
	}
}

if ( ! function_exists( 'storefront_post_meta' ) ) {
	/**
	 * Display the post meta
	 *
	 * @since 1.0.0
	 */
	function storefront_post_meta() {
		?>

			<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search.

			?>

				<?php
					echo get_avatar( get_the_author_meta( 'ID' ), 128 );
					echo '
' . esc_attr( __( 'Written by', 'storefront' ) ) . '
';
					echo sprintf( '%2$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() );
				?>

			<?php
			/* translators: used between list items, there is a space after the comma */
			$categories_list = get_the_category_list( __( ', ', 'storefront' ) );

			if ( $categories_list ) : ?>

					<?php
					echo '
' . esc_attr( __( 'Posted in', 'storefront' ) ) . '
';
					echo wp_kses_post( $categories_list );
					?>

			<?php endif; // End if categories. ?>

			<?php
			/* translators: used between list items, there is a space after the comma */
			$tags_list = get_the_tag_list( '', __( ', ', 'storefront' ) );

			if ( $tags_list ) : ?>

					<?php
					echo '
' . esc_attr( __( 'Tagged', 'storefront' ) ) . '
';
					echo wp_kses_post( $tags_list );
					?>

			<?php endif; // End if $tags_list. ?>

		<?php endif; // End if 'post' == get_post_type(). ?>

			<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>

					<?php echo '
' . esc_attr( __( 'Comments', 'storefront' ) ) . '
'; ?>
					<?php comments_popup_link( __( 'Leave a comment', 'storefront' ), __( '1 Comment', 'storefront' ), __( '% Comments', 'storefront' ) ); ?>

			<?php endif; ?>

		<?php
	}
}

if ( ! function_exists( 'storefront_paging_nav' ) ) {
	/**
	 * Display navigation to next/previous set of posts when applicable.
	 */
	function storefront_paging_nav() {
		global $wp_query;

		$args = array(
			'type' 	    => 'list',
			'next_text' => _x( 'Next', 'Next post', 'storefront' ),
			'prev_text' => _x( 'Previous', 'Previous post', 'storefront' ),
			);

		the_posts_pagination( $args );
	}
}

if ( ! function_exists( 'storefront_post_nav' ) ) {
	/**
	 * Display navigation to next/previous post when applicable.
	 */
	function storefront_post_nav() {
		$args = array(
			'next_text' => '%title',
			'prev_text' => '%title',
			);
		the_post_navigation( $args );
	}
}

if ( ! function_exists( 'storefront_posted_on' ) ) {
	/**
	 * Prints HTML with meta information for the current post-date/time and author.
	 */
	function storefront_posted_on() {
		$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
		if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
			$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time> <time class="updated" datetime="%3$s">%4$s</time>';
		}

		$time_string = sprintf( $time_string,
			esc_attr( get_the_date( 'c' ) ),
			esc_html( get_the_date() ),
			esc_attr( get_the_modified_date( 'c' ) ),
			esc_html( get_the_modified_date() )
		);

		$posted_on = sprintf(
			_x( 'Posted on %s', 'post date', 'storefront' ),
			'' . $time_string . ''
		);

		echo wp_kses( apply_filters( 'storefront_single_post_posted_on_html', '' . $posted_on . '', $posted_on ), array(
			'span' => array(
				'class'  => array(),
			),
			'a'    => array(
				'href'  => array(),
				'title' => array(),
				'rel'   => array(),
			),
			'time' => array(
				'datetime' => array(),
				'class'    => array(),
			),
		) );
	}
}

if ( ! function_exists( 'storefront_product_categories' ) ) {
	/**
	 * Display Product Categories
	 * Hooked into the `homepage` action in the homepage template
	 *
	 * @since  1.0.0
	 * @param array $args the product section args.
	 * @return void
	 */
	function storefront_product_categories( $args ) {

		if ( storefront_is_woocommerce_activated() ) {

			$args = apply_filters( 'storefront_product_categories_args', array(
				'limit' 			=> 3,
				'columns' 			=> 3,
				'child_categories' 	=> 0,
				'orderby' 			=> 'name',
				'title'				=> __( 'Shop by Category', 'storefront' ),
			) );

			$shortcode_content = storefront_do_shortcode( 'product_categories', apply_filters( 'storefront_product_categories_shortcode_args', array(
				'number'  => intval( $args['limit'] ),
				'columns' => intval( $args['columns'] ),
				'orderby' => esc_attr( $args['orderby'] ),
				'parent'  => esc_attr( $args['child_categories'] ),
			) ) );

			/**
			 * Only display the section if the shortcode returns product categories
			 */
			if ( false !== strpos( $shortcode_content, 'product-category' ) ) {

				echo '
';

				do_action( 'storefront_homepage_before_product_categories' );

				echo '
' . wp_kses_post( $args['title'] ) . '
';

				do_action( 'storefront_homepage_after_product_categories_title' );

				echo $shortcode_content;

				do_action( 'storefront_homepage_after_product_categories' );

				echo '
';

			}
		}
	}
}

if ( ! function_exists( 'storefront_recent_products' ) ) {
	/**
	 * Display Recent Products
	 * Hooked into the `homepage` action in the homepage template
	 *
	 * @since  1.0.0
	 * @param array $args the product section args.
	 * @return void
	 */
	function storefront_recent_products( $args ) {

		if ( storefront_is_woocommerce_activated() ) {

			$args = apply_filters( 'storefront_recent_products_args', array(
				'limit' 			=> 4,
				'columns' 			=> 4,
				'title'				=> __( 'New In', 'storefront' ),
			) );

			$shortcode_content = storefront_do_shortcode( 'recent_products', apply_filters( 'storefront_recent_products_shortcode_args', array(
				'per_page' => intval( $args['limit'] ),
				'columns'  => intval( $args['columns'] ),
			) ) );

			/**
			 * Only display the section if the shortcode returns products
			 */
			if ( false !== strpos( $shortcode_content, 'product' ) ) {

				echo '
';

				do_action( 'storefront_homepage_before_recent_products' );

				echo '
' . wp_kses_post( $args['title'] ) . '
';

				do_action( 'storefront_homepage_after_recent_products_title' );

				echo $shortcode_content;

				do_action( 'storefront_homepage_after_recent_products' );

				echo '
';

			}
		}
	}
}

if ( ! function_exists( 'storefront_featured_products' ) ) {
	/**
	 * Display Featured Products
	 * Hooked into the `homepage` action in the homepage template
	 *
	 * @since  1.0.0
	 * @param array $args the product section args.
	 * @return void
	 */
	function storefront_featured_products( $args ) {

		if ( storefront_is_woocommerce_activated() ) {

			$args = apply_filters( 'storefront_featured_products_args', array(
				'limit'   => 4,
				'columns' => 4,
				'orderby' => 'date',
				'order'   => 'desc',
				'title'   => __( 'We Recommend', 'storefront' ),
			) );

			$shortcode_content = storefront_do_shortcode( 'featured_products', apply_filters( 'storefront_featured_products_shortcode_args', array(
				'per_page' => intval( $args['limit'] ),
				'columns'  => intval( $args['columns'] ),
				'orderby'  => esc_attr( $args['orderby'] ),
				'order'    => esc_attr( $args['order'] ),
			) ) );

			/**
			 * Only display the section if the shortcode returns products
			 */
			if ( false !== strpos( $shortcode_content, 'product' ) ) {

				echo '
';

				do_action( 'storefront_homepage_before_featured_products' );

				echo '
' . wp_kses_post( $args['title'] ) . '
';

				do_action( 'storefront_homepage_after_featured_products_title' );

				echo $shortcode_content;

				do_action( 'storefront_homepage_after_featured_products' );

				echo '
';

			}
		}
	}
}

if ( ! function_exists( 'storefront_popular_products' ) ) {
	/**
	 * Display Popular Products
	 * Hooked into the `homepage` action in the homepage template
	 *
	 * @since  1.0.0
	 * @param array $args the product section args.
	 * @return void
	 */
	function storefront_popular_products( $args ) {

		if ( storefront_is_woocommerce_activated() ) {

			$args = apply_filters( 'storefront_popular_products_args', array(
				'limit'   => 4,
				'columns' => 4,
				'title'   => __( 'Fan Favorites', 'storefront' ),
			) );

			$shortcode_content = storefront_do_shortcode( 'top_rated_products', apply_filters( 'storefront_popular_products_shortcode_args', array(
				'per_page' => intval( $args['limit'] ),
				'columns'  => intval( $args['columns'] ),
			) ) );

			/**
			 * Only display the section if the shortcode returns products
			 */
			if ( false !== strpos( $shortcode_content, 'product' ) ) {

				echo '
';

				do_action( 'storefront_homepage_before_popular_products' );

				echo '
' . wp_kses_post( $args['title'] ) . '
';

				do_action( 'storefront_homepage_after_popular_products_title' );

				echo $shortcode_content;

				do_action( 'storefront_homepage_after_popular_products' );

				echo '
';

			}
		}
	}
}

if ( ! function_exists( 'storefront_on_sale_products' ) ) {
	/**
	 * Display On Sale Products
	 * Hooked into the `homepage` action in the homepage template
	 *
	 * @param array $args the product section args.
	 * @since  1.0.0
	 * @return void
	 */
	function storefront_on_sale_products( $args ) {

		if ( storefront_is_woocommerce_activated() ) {

			$args = apply_filters( 'storefront_on_sale_products_args', array(
				'limit'   => 4,
				'columns' => 4,
				'title'   => __( 'On Sale', 'storefront' ),
			) );

			$shortcode_content = storefront_do_shortcode( 'sale_products', apply_filters( 'storefront_on_sale_products_shortcode_args', array(
				'per_page' => intval( $args['limit'] ),
				'columns'  => intval( $args['columns'] ),
			) ) );

			/**
			 * Only display the section if the shortcode returns products
			 */
			if ( false !== strpos( $shortcode_content, 'product' ) ) {

				echo '
';

				do_action( 'storefront_homepage_before_on_sale_products' );

				echo '
' . wp_kses_post( $args['title'] ) . '
';

				do_action( 'storefront_homepage_after_on_sale_products_title' );

				echo $shortcode_content;

				do_action( 'storefront_homepage_after_on_sale_products' );

				echo '
';

			}
		}
	}
}

if ( ! function_exists( 'storefront_best_selling_products' ) ) {
	/**
	 * Display Best Selling Products
	 * Hooked into the `homepage` action in the homepage template
	 *
	 * @since 2.0.0
	 * @param array $args the product section args.
	 * @return void
	 */
	function storefront_best_selling_products( $args ) {
		if ( storefront_is_woocommerce_activated() ) {

			$args = apply_filters( 'storefront_best_selling_products_args', array(
				'limit'   => 4,
				'columns' => 4,
				'title'	  => esc_attr__( 'Best Sellers', 'storefront' ),
			) );

			$shortcode_content = storefront_do_shortcode( 'best_selling_products', apply_filters( 'storefront_best_selling_products_shortcode_args', array(
				'per_page' => intval( $args['limit'] ),
				'columns'  => intval( $args['columns'] ),
			) ) );

			/**
			 * Only display the section if the shortcode returns products
			 */
			if ( false !== strpos( $shortcode_content, 'product' ) ) {

				echo '
';

				do_action( 'storefront_homepage_before_best_selling_products' );

				echo '
' . wp_kses_post( $args['title'] ) . '
';

				do_action( 'storefront_homepage_after_best_selling_products_title' );

				echo $shortcode_content;

				do_action( 'storefront_homepage_after_best_selling_products' );

				echo '
';

			}
		}
	}
}

if ( ! function_exists( 'storefront_homepage_content' ) ) {
	/**
	 * Display homepage content
	 * Hooked into the `homepage` action in the homepage template
	 *
	 * @since  1.0.0
	 * @return  void
	 */
	function storefront_homepage_content() {
		while ( have_posts() ) {
			the_post();

			get_template_part( 'content', 'homepage' );

		} // end of the loop.
	}
}

if ( ! function_exists( 'storefront_social_icons' ) ) {
	/**
	 * Display social icons
	 * If the subscribe and connect plugin is active, display the icons.
	 *
	 * @link http://wordpress.org/plugins/subscribe-and-connect/
	 * @since 1.0.0
	 */
	function storefront_social_icons() {
		if ( class_exists( 'Subscribe_And_Connect' ) ) {
			echo '
';
			subscribe_and_connect_connect();
			echo '
';
		}
	}
}

if ( ! function_exists( 'storefront_get_sidebar' ) ) {
	/**
	 * Display storefront sidebar
	 *
	 * @uses get_sidebar()
	 * @since 1.0.0
	 */
	function storefront_get_sidebar() {
		get_sidebar();
	}
}

if ( ! function_exists( 'storefront_post_thumbnail' ) ) {
	/**
	 * Display post thumbnail
	 *
	 * @var $size thumbnail size. thumbnail|medium|large|full|$custom
	 * @uses has_post_thumbnail()
	 * @uses the_post_thumbnail
	 * @param string $size the post thumbnail size.
	 * @since 1.5.0
	 */
	function storefront_post_thumbnail( $size = 'full' ) {
		if ( has_post_thumbnail() ) {
			the_post_thumbnail( $size );
		}
	}
}

if ( ! function_exists( 'storefront_primary_navigation_wrapper' ) ) {
	/**
	 * The primary navigation wrapper
	 */
	function storefront_primary_navigation_wrapper() {
		echo '
';
	}
}

if ( ! function_exists( 'storefront_primary_navigation_wrapper_close' ) ) {
	/**
	 * The primary navigation wrapper close
	 */
	function storefront_primary_navigation_wrapper_close() {
		echo '
';
	}
}


text:
package edu.kit.iti.formal.pse.worthwhile.prover;

import java.util.Arrays;
import java.util.Collection;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

import edu.kit.iti.formal.pse.worthwhile.common.tests.TestASTProvider;
import edu.kit.iti.formal.pse.worthwhile.model.ast.Program;
import edu.kit.iti.formal.pse.worthwhile.prover.caller.Z3Prover;

/**
 * Test for {@link DivisionByZeroAssertionInserter} which ensures that Divisions by zero cause the proof to fail.
 *
 * @author Leon Handreke
 */
@RunWith(Parameterized.class)
public class DivisionByZeroAssertionInserterTest {
	/**
	 * Test if division by a zero literal causes the proof to fail.
	 */
	private static final String DIVISIONBYZEROLITERAL = "Integer a := 1/0\n_assert(true)\n";

	/**
	 * Test if division by a variable set to zero causes the proof to fail.
	 */
	private static final String DIVISIONBYZEROVARIABLE = "Integer a := 0\nInteger b := 42 / a\n_assert(true)\n";

	/**
	 * Test if division by a variable that was previously set to zero causes the proof to succeed like it should.
	 */
	private static final String DIVISIONBYMULTIPLEZEROVARIABLES = "Integer a := 2\nInteger b := 42 / a\na := 0\nb := 42 / 1\n_assert(true)\n";

	/**
	 * Test if Divisions by zero inside the condition of a Conditional cause the proof to fail.
	 */
	private static final String DIVISIONBYZEROCONDITIONAL = "Integer a := 0\nif(10 / a = 2) {\n    a := 0\n    Integer b := 42 / 1\n}\n_assert(true)\n";

	/**
	 * Test if modulus by a zero literal causes the proof to fail.
	 */
	private static final String MODULUSBYZEROLITERAL = "Integer a := 1 % 0\n_assert(true)\n";

	/**
	 * Test if modulus by a variable set to zero causes the proof to fail.
	 */
	private static final String MODULUSBYZEROVARIABLE = "Integer a := 0\nInteger b := 42 % a\n_assert(true)\n";

	/**
	 * Test if modulus by a variable that was previously set to zero causes the proof to succeed like it should.
	 */
	private static final String MODULUSBYMULTIPLEZEROVARIABLES = "Integer a := 2\nInteger b := 42 % a\na := 0\nb := 42 % 1\n_assert(true)\n";

	/**
	 * Test if modulus by zero inside the condition of a conditional causes the proof to fail.
	 */
	private static final String MODULUSBYZEROCONDITIONAL = "Integer a := 0\nif(10 % a = 2) {\na := 0\nInteger b := 42 % 1\n}\n_assert(true)\n";

	/**
	 * The {@link SpecificationChecker} whose {@link Program} validity checking is tested.
	 */
	private SpecificationChecker checker;

	/**
	 * The {@link Program} for which the {@link DivisionByZeroAssertionInserterTest#checker}'s validity checking is
	 * tested.
	 */
	private Program testProgram;

	/**
	 * The expected value for the {@link DivisionByZeroAssertionInserterTest#testProgram}'s validity.
	 */
	private Validity expectedValidity;

	/**
	 *
	 * @return a {@link Collection} of test parameters, in which several
	 *         {@link DivisionByZeroAssertionInserterTest#testProgram}s are assigned an
	 *         {@link DivisionByZeroAssertionInserterTest#expectedValidity}
	 */
	@Parameters
	public static Collection<Object[]> testData() {
		return Arrays.asList(new Object[][] {
		                { TestASTProvider.getRootASTNode(DIVISIONBYZEROLITERAL), Validity.INVALID },
		                { TestASTProvider.getRootASTNode(DIVISIONBYZEROVARIABLE), Validity.INVALID },
		                { TestASTProvider.getRootASTNode(DIVISIONBYMULTIPLEZEROVARIABLES), Validity.VALID },
		                { TestASTProvider.getRootASTNode(DIVISIONBYZEROCONDITIONAL), Validity.INVALID },
		                { TestASTProvider.getRootASTNode(MODULUSBYZEROLITERAL), Validity.INVALID },
		                { TestASTProvider.getRootASTNode(MODULUSBYZEROVARIABLE), Validity.INVALID },
		                { TestASTProvider.getRootASTNode(MODULUSBYMULTIPLEZEROVARIABLES), Validity.VALID },
		                { TestASTProvider.getRootASTNode(MODULUSBYZEROCONDITIONAL), Validity.INVALID } });
	}

	/**
	 * Initializes the test parameters and the to be used {@link SpecificationChecker}.
	 *
	 * @param testProgram
	 *                the {@link Program} whose {@link Validity} is to be checked
	 * @param expectedValidity
	 *                the Validity expected for the given testProgram
	 *
	 * @see DivisionByZeroAssertionInserterTest#testTestProgramValidity()
	 */
	public DivisionByZeroAssertionInserterTest(final Program testProgram, final Validity expectedValidity) {
		this.checker = new SpecificationChecker(new Z3Prover(5000));

		this.testProgram = testProgram;
		this.expectedValidity = expectedValidity;
	}

	/**
	 * Asserts that the {@link DivisionByZeroAssertionInserterTest#checker} returns the expected
	 * {@link DivisionByZeroAssertionInserterTest#expectedValidity} for the
	 * {@link DivisionByZeroAssertionInserterTest#testProgram}.
	 */
	@Test
	public final void testTestProgramValidity() {
		Assert.assertEquals(this.expectedValidity, this.checker.checkProgram(this.testProgram));
	}
}

redpajama_set_name: RedPajamaGithub


text:
            Administrate Class: {{schoolclass.name}}

                School
                :
                {{school.name}}

                School
                :
                unknown

                Country
                :
                {{school.country}}

                Country
                :
                unknown

    <form class="form-horizontal" data-ng-submit="update()" novalidate>
        <fieldset>

                    Id

                        {{schoolclass._id}}

                    Name

                        <input type="text"
                               data-ng-model="schoolclass.name"
                               id="name"
                               class="form-control">

                    Teachers
                    none

                    Teachers

                        {{displayName}} ({{teacher}})

                    Students
                    none

                    Students

                        {{displayName}} ({{student}})

                    Courses
                    none

                    Courses

                         {{course.name}} ({{course._id}})

                    <input type="submit" class="btn btn-rememberators">

        </fieldset>
    </form>


text:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/bt_base_background"
    android:minHeight="200dp"
    android:animateLayoutChanges="true"
    tools:context="com.braintreepayments.api.DropInActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:animateLayoutChanges="true"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/bt_vaulted_payment_methods_wrapper"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:visibility="gone">

            <RelativeLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingTop="@dimen/bt_choose_existing_payment_label_padding_top">

                <Button
                    android:id="@+id/bt_vault_edit_button"
                    style="@style/Widget.AppCompat.Button.Borderless.Colored"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentEnd="true"
                    android:text="@string/bt_edit"
                    android:theme="@style/bt_edit_button"
                    android:visibility="invisible"
                    android:contentDescription="@string/bt_edit_button_description"/>

                <TextView
                    android:id="@+id/bt_vaulted_payment_methods_header"
                    style="@style/bt_choose_payment_label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignTop="@id/bt_vault_edit_button"
                    android:layout_alignBottom="@id/bt_vault_edit_button"
                    android:layout_alignParentStart="true"
                    android:layout_marginStart="20dp"
                    android:gravity="center_vertical"
                    android:text="@string/bt_recent" />

            </RelativeLayout>

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/bt_vaulted_payment_methods"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingLeft="4dp"
                android:paddingRight="4dp"
                android:contentDescription="@string/bt_saved_payments"/>

            <include layout="@layout/bt_section_divider" />

        </LinearLayout>

        <TextView
            android:id="@+id/bt_supported_payment_methods_header"
            style="@style/bt_choose_payment_label"
            android:paddingTop="@dimen/bt_choose_new_payment_label_padding_top"
            android:paddingBottom="@dimen/bt_payment_label_padding_bottom"
            android:text="@string/bt_select_payment_method" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/bt_supported_payment_methods"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="4dp"
            android:paddingRight="4dp"
            android:contentDescription="@string/bt_supported_payments"/>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/bt_select_payment_method_loader_wrapper"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/bt_base_background"
        android:gravity="center"
        android:orientation="vertical">

        <ProgressBar
            android:id="@+id/bt_select_payment_method_loader"
            android:layout_width="@dimen/bt_progress_bar_diameter"
            android:layout_height="@dimen/bt_progress_bar_diameter"
            android:layout_gravity="center"
            android:indeterminate="true" />

    </LinearLayout>

</FrameLayout>


text:
package org.gradle.tooling.internal.consumer.converters;

import org.gradle.api.JavaVersion;
import org.gradle.tooling.model.idea.IdeaProject;

import java.io.Serializable;

public class CompatibilityIdeaProjectMapping {
    private final IdeaProject ideaProject;

    public CompatibilityIdeaProjectMapping(IdeaProject ideaProject) {
        this.ideaProject = ideaProject;
    }

    public CompatibilityIdeaProjectJavaLanguageSettings getJavaLanguageSettings() {
        return new CompatibilityIdeaProjectJavaLanguageSettings(ideaProject);
    }

    public static class CompatibilityIdeaProjectJavaLanguageSettings implements Serializable {
        private final IdeaProject ideaProject;

        public CompatibilityIdeaProjectJavaLanguageSettings(IdeaProject ideaProject) {
            this.ideaProject = ideaProject;
        }

        public JavaVersion getLanguageLevel() {
            return JavaVersion.valueOf(ideaProject.getLanguageLevel().getLevel().replaceFirst("JDK", "VERSION"));
        }
    }
}


text:
"""Read an Association File and store the data in a Python object."""

import sys
import timeit
import datetime
import collections as cx
import logging

from goatools.evidence_codes import EvidenceCodes
from goatools.anno.opts import AnnoOptions
from goatools.godag.consts import NAMESPACE2NS
from goatools.gosubdag.go_tasks import get_go2parents_go2obj

__copyright__ = "Copyright (C) 2016-present, DV Klopfenstein, H Tang. All rights reserved."
__author__ = "DV Klopfenstein"

# pylint: disable=useless-object-inheritance,too-many-public-methods
class AnnoReaderBase(object):
    """Reads a Gene Association File. Returns a Python object."""
    # pylint: disable=broad-except,line-too-long,too-many-instance-attributes

    tic = timeit.default_timer()

    # Expected values for a Qualifier
    exp_qualifiers = set([
        # Seen in both GAF and gene2go
        'not', 'contributes_to', 'colocalizes_with',
    ])

    valid_formats = {'gpad', 'gaf', 'gene2go', 'id2gos'}

    exp_nss = set(['BP', 'MF', 'CC'])

    def __init__(self, name, filename=None, **kws):
        # kws: allow_missing_symbol
        self.name = name  # name is one of valid_formats
        self.filename = filename
        self.godag = kws.get('godag')
        self.namespaces = kws.get('namespaces')
        self.evobj = EvidenceCodes()
        # Read anotation file, store namedtuples:
        #     Gene2GoReader(filename=None, taxids=None):
        #     GafReader(filename=None, hdr_only=False, prt=sys.stdout, allow_missing_symbol=False):
        #     GpadReader(filename=None, hdr_only=False):
        self.hdr = None
        self.datobj = None
        # pylint: disable=no-member
        self.associations = self._init_associations(filename, **kws)
        # assert self.associations, 'NO ANNOTATIONS FOUND: {ANNO}'.format(ANNO=filename)
        assert self.namespaces is None or isinstance(self.namespaces, set)

    def get_desc(self):
        """Get description"""
        return '{NAME} {NSs} {GODAG}'.format(
            NAME=self.name,
            NSs='' if self.namespaces is None else ','.join(self.namespaces),
            GODAG='' if self.godag is None else 'godag')

    # pylint: disable=unused-argument
    def get_associations(self, taxid=None):
        """Get associations"""
        # taxid is for NCBI's gene2gos
        return self.associations

    def prt_summary_anno2ev(self, prt=sys.stdout):
        """Print annotation/evidence code summary."""
        self.evobj.prt_summary_anno2ev(self.associations, prt)

    def get_name(self):
        """Return type of annotation"""
        return self.name

    # pylint: disable=no-self-use
    def get_taxid(self):
        """Return taxid, if one was provided, otherwise return -1"""
        return -1

    # Arg, taxid, is used by NCBI's annotations, but not by gpad, gaf, etc.
    def get_ns2assc(self, taxid=None, **kws):
        """Return given associations into 3 (BP, MF, CC) dicts, id2gos"""
        return {ns:self._get_id2gos(nts, **kws) for ns, nts in self.get_ns2ntsanno().items()}

    # pylint: disable=unused-argument
    # Arg, taxid, is used by NCBI's annotations, but not by gpad, gaf, etc.
    def get_ns2ntsanno(self, taxid=None):
        """Split list of annotations into 3 lists: BP, MF, CC"""
        return self._get_ns2ntsanno(self.associations)

    # Used by gpad, gaf, etc., but not used by NCBI's annotation reader
    def _get_ns2ntsanno(self, annotations):
        """Split list of annotations into 3 lists: BP, MF, CC"""
        if self.name in {'gpad', 'id2gos'}:
            assert self.godag is not None, "{T}: LOAD godag TO USE {C}::ns2ntsanno".format(
                C=self.__class__.__name__, T=self.name)
        ns2nts = cx.defaultdict(list)
        if self.godag:
            s_godag = self.godag
            for nta in annotations:
                if nta.GO_ID in s_godag:
                    ns2nts[nta.NS].append(nta)
        else:
            for nta in annotations:
                ns2nts[nta.NS].append(nta)
        return {ns:ns2nts[ns] for ns in ns2nts}

    def get_id2gos_nss(self, **kws):
        """Return all associations in a dict, id2gos, regardless of namespace"""
        return self._get_id2gos(self.associations, **kws)

    def get_id2gos(self, namespace=None, prt=sys.stdout, **kws):
        """Return associations from specified namespace in a dict, id2gos"""
        # pylint: disable=superfluous-parens
        if self.has_ns():  # Anno namedtuple has NS field
            nspc, assoc = self._get_1ns_assn(namespace)
            id2gos = self._get_id2gos(assoc, **kws)
            if prt:
                prt.write('{N} IDs in loaded association branch, {NS}\n'.format(N=len(id2gos), NS=nspc))
            return id2gos
        if prt and self.godag is None:
            logging.warning('%s.get_id2gos: GODAG is None. IGNORING namespace(%s). If you are running `map_to_slim.py`, this warning can be ignored.',
                            type(self).__name__, namespace)
        id2gos = self._get_id2gos(self.associations, **kws)
        if prt:
            prt.write('{N} IDs in all associations\n'.format(N=len(id2gos)))
        return id2gos

    def _get_1ns_assn(self, namespace_usr):
        """Get one namespace, given a user-provided namespace or a default"""
        # If all namespaces were loaded
        if self.namespaces is None:
            # Return user-specified namespace, if provided. Otherwise BP
            nspc = self._get_biggest_namespace() if namespace_usr is None else namespace_usr
            # Return one namespace
            if nspc in set(NAMESPACE2NS.values()):
                return nspc, [nt for nt in self.associations if nt.NS == nspc]
            # Return all namespaces
            return nspc, self.associations
        # If one namespace was loaded, use that regardless of what user specfies
        if len(self.namespaces) == 1:
            nspc = next(iter(self.namespaces))
            if namespace_usr is not None and nspc != namespace_usr:
                print('**WARNING: IGNORING {ns}; ONLY {NS} WAS LOADED'.format(
                    ns=namespace_usr, NS=nspc))
            return nspc, self.associations
        if namespace_usr is None:
            print('**ERROR get_id2gos: GODAG NOT LOADED. USING: {NSs}'.format(
                NSs=' '.join(sorted(self.namespaces))))
        return namespace_usr, self.associations

    def _get_biggest_namespace(self):
        """Get the namespace with the most ontology terms"""
        nspc_ctr = cx.Counter([o.namespace for o in self.godag.values()])
        return max(nspc_ctr, key=nspc_ctr.get)

    def has_ns(self):
        """Return True if namespace field, NS exists on annotation namedtuples"""
        assert self.associations, 'NO ASSOCIATIONS IN file({}): {}'.format(self.filename, self.associations)
        return hasattr(next(iter(self.associations)), 'NS')

    def _get_id2gos(self, ntannos_usr, propagate_counts=False, relationships=None, prt=sys.stdout, **kws):
        """Return given ntannos_usr in a dict, id2gos"""
        options = AnnoOptions(self.evobj, **kws)
        # Default reduction is to remove. For all options, see goatools/anno/opts.py:
        #   * Evidence_Code == ND -> No biological data No biological Data available
        #   * Qualifiers contain NOT
        ntannos_indag = self._get_anno_in_dag(ntannos_usr)
        ntannos_m = self.reduce_annotations(ntannos_indag, options)
        dbid2goids = self.get_dbid2goids(ntannos_m, propagate_counts, relationships, prt)
        if options.b_geneid2gos:
            return dbid2goids
        # if not a2bs:
        #     raise RuntimeError('**ERROR: NO ASSOCATIONS FOUND: {FILE}'.format(FILE=self.filename))
        return self._get_goid2dbids(dbid2goids)

    def _get_anno_in_dag(self, ntsanno):
        """Return annotations that are in the GODAG"""
        s_godag = self.godag
        return [nt for nt in ntsanno if nt.GO_ID in s_godag] if s_godag else ntsanno

    @staticmethod
    def _get_goid2dbids(dbid2goids):
        """Return dict of GO ID keys and a set of gene products as values"""
        goid2dbids = cx.defaultdict(set)
        for dbid, goids in dbid2goids.items():
            for goid in goids:
                goid2dbids[goid].add(dbid)
        return dict(goid2dbids)

    def _get_namespaces(self, nts):
        """Get the set of namespaces seen in the namedtuples."""
        return set(nt.NS for nt in nts) if self.has_ns() else set()

    # Qualifier (column 4)
    # Flags that modify the interpretation of an annotation one (or more) of NOT, contributes_to, colocalizes_with
    # This field is not mandatory;
    #     * cardinality 0, 1, >1;
    #     * for cardinality >1 use a pipe to separate entries (e.g. NOT|contributes_to)
    def prt_qualifiers(self, prt=sys.stdout):
        """Print Qualifiers: 1,462 colocalizes_with; 1,454 contributes_to; 1,157 not"""
        # 13 not colocalizes_with   (TBD: CHK - Seen in gene2go, but not gafs)
        #  4 not contributes_to     (TBD: CHK - Seen in gene2go, but not gafs)
        self._prt_qualifiers(self.associations, prt)

    @staticmethod
    def _prt_qualifiers(associations, prt=sys.stdout):
        """Print Qualifiers found in the annotations.
           QUALIFIERS:
                1,462 colocalizes_with
                1,454 contributes_to
                1,157 not
                   13 not colocalizes_with   (TBD: CHK - Seen in gene2go, but not gafs)
                    4 not contributes_to     (TBD: CHK - Seen in gene2go, but not gafs)
        """
        prt.write('QUALIFIERS:\n')
        for fld, cnt in cx.Counter(q for nt in associations for q in nt.Qualifier).most_common():
            prt.write('    {N:6,} {FLD}\n'.format(N=cnt, FLD=fld))

    def reduce_annotations(self, annotations, options):
        """Reduce annotations to ones used to identify enrichment (normally exclude ND and NOT)."""
        getfnc_qual_ev = options.getfnc_qual_ev()
        return [nt for nt in annotations if getfnc_qual_ev(nt.Qualifier, nt.Evidence_Code)]

    @staticmethod
    def update_association(assc_goidsets, go2ancestors, prt=sys.stdout):
        """Update the GO sets in assc_gene2gos to include all GO ancestors"""
        goids_avail = set(go2ancestors)
        # assc_gos is assc_gene2gos.values()
        for assc_goids_cur in assc_goidsets:
            parents = set()
            for goid in assc_goids_cur.intersection(goids_avail):
                parents.update(go2ancestors[goid])
            assc_goids_cur.update(parents)

    def _get_go2ancestors(self, goids_assoc_usr, relationships, prt=sys.stdout):
        """Return go2ancestors (set of parent GO IDs) for all GO ID keys in go2obj."""
        assert self.godag is not None
        _godag = self.godag
        # Get GO IDs in annotations that are in GO DAG
        goids_avail = set(_godag)
        goids_missing = self._rpt_goids_notfound(goids_assoc_usr, goids_avail)
        goids_assoc_cur = goids_assoc_usr.intersection(goids_avail).difference(goids_missing)
        # Get GO Term for each current GO ID in the annotations
        _go2obj_assc = {go:_godag[go] for go in goids_assoc_cur}
        go2ancestors = get_go2parents_go2obj(_go2obj_assc, relationships, prt)
        if prt:
            prt.write('{N} GO IDs -> {M} go2ancestors\n'.format(
                N=len(goids_avail), M=len(go2ancestors)))
        return go2ancestors

    @staticmethod
    def _rpt_goids_notfound(goids_assoc_all, goids_avail):
        """Report the number of GO IDs in the association, but not in the GODAG"""
        goids_missing = goids_assoc_all.difference(goids_avail)
        if goids_missing:
            print("{N} GO IDs NOT FOUND IN ASSOCIATION: {GOs}".format(
                N=len(goids_missing), GOs=" ".join(sorted(goids_missing))))
        return goids_missing

    def get_dbid2goids(self, ntannos, propagate_counts=False, relationships=None, prt=sys.stdout):
        """Return gene2go data for user-specified taxids."""
        if propagate_counts:
            return self._get_dbid2goids_p1(ntannos, relationships, prt)
        return self._get_dbid2goids_p0(ntannos)

    @staticmethod
    def _get_dbid2goids_p0(associations):
        """Return gene2goids with annotations as-is (propagate_counts == False)"""
        id2gos = cx.defaultdict(set)
        for ntd in associations:
            id2gos[ntd.DB_ID].add(ntd.GO_ID)
        return dict(id2gos)

    def _get_dbid2goids_p1(self, ntannos, relationships=None, prt=sys.stdout):
        """Return gene2goids with propagate_counts == True"""
        id2gos = cx.defaultdict(set)
        goids_annos = set(nt.GO_ID for nt in ntannos)
        go2ancestors = self._get_go2ancestors(goids_annos, relationships, prt)
        # https://github.com/geneontology/go-annotation/issues/3523
        ## exclude = {'GO:2000325', 'GO:2000327'}
        for ntd in ntannos:
            goid = ntd.GO_ID
            goids = id2gos[ntd.DB_ID]
            goids.add(goid)
            if goid in go2ancestors:
                goids.update(go2ancestors[goid])
        return dict(id2gos)

    @staticmethod
    def get_goid2dbids(associations):
        """Return gene2go data for user-specified taxids."""
        go2ids = cx.defaultdict(set)
        for ntd in associations:
            go2ids[ntd.GO_ID].add(ntd.DB_ID)
        return dict(go2ids)

    def hms(self, msg, tic=None, prt=sys.stdout):
        """Print elapsed time and message."""
        if tic is None:
            tic = self.tic
        now = timeit.default_timer()
        hms = str(datetime.timedelta(seconds=(now-tic)))
        prt.write('{HMS}: {MSG}\n'.format(HMS=hms, MSG=msg))
        return now

    def chk_associations(self, fout_err=None):
        """Check that associations are in expected format."""
        # pylint: disable=unnecessary-pass
        pass

    def nts_ev_nd(self):
        """Get annotations where Evidence_code == 'ND' (No biological data)"""
        return [nt for nt in self.associations if nt.Evidence_Code == 'ND']

    def nts_qual_not(self):
        """Get annotations having Qualifiers containing NOT"""
        return [nt for nt in self.associations if self._has_not_qual(nt)]

    def chk_qualifiers(self):
        """Check format of qualifier"""
        if self.name == 'id2gos':
            return
        for ntd in self.associations:
            # print(ntd)
            qual = ntd.Qualifier
            assert isinstance(qual, set), '{NAME}: QUALIFIER MUST BE A LIST: {NT}'.format(
                NAME=self.name, NT=ntd)
            assert qual != set(['']), ntd
            assert qual != set(['-']), ntd
            assert 'always' not in qual, 'SPEC SAID IT WOULD BE THERE'

    def chk_godag(self):
        """Check that a GODag was loaded"""
        if not self.godag:
            raise RuntimeError('{CLS} MUST INCLUDE GODag: {CLS}(file.anno, godag=godag)'.format(
                CLS=self.__class__.__name__))

    @staticmethod
    def _has_not_qual(ntd):
        """Return True if the qualifiers contain a 'NOT'"""
        for qual in ntd.Qualifier:
            if 'not' in qual:
                return True
            if 'NOT' in qual:
                return True
        return False

    def prt_counts(self, prt=sys.stdout):
        """Print the number of taxids stored."""
        num_annos = len(self.associations)
        # 792,891 annotations for 3 taxids stored: 10090 7227 9606
        prt.write('{A:8,} annotations\n'.format(A=num_annos))

# Copyright (C) 2016-present, DV Klopfenstein, H Tang. All rights reserved."


text:
<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model common\models\CompanyCategory */

$this->title = 'Create Company Category';
$this->params['breadcrumbs'][] = ['label' => 'Company Categories', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

                    <?= $this->render('_form', [
                        'model' => $model,
                    ]) ?>


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
J. C. Loudon, Encycl. trees shrubs 1092. 1842

#### Original name
null

### Remarks
null


text:
package edu.clemson.cs.rsrg.typeandpopulate.typereasoning;

import edu.clemson.cs.rsrg.typeandpopulate.typevisitor.AlphaEquivalencyChecker;

/**
 *
Type reasoning is used extensively by the prover, where things are done
 * in a tight loop that needs to run as quickly as possible.  As a result,
 * performance is at a premium and we want to avoid dynamic object creation.
 * At the same time, we can't have a bunch of static variables running around
 * because many of these structures are not thread safe.  This class is
 * guaranteed not to be shared between threads

 *
 * @version 2.0
 */
public class PerThreadReasoningResources {

    /**
Simply create one alpha equivalency checker.
 */
    public final AlphaEquivalencyChecker alphaChecker =
            new AlphaEquivalencyChecker();

}


text:
from unittest import TestCase

from muntjac.test.muntjac_classes import MuntjacClasses
from muntjac.ui.custom_layout import CustomLayout
from muntjac.ui.horizontal_layout import HorizontalLayout
from muntjac.ui.label import Label

class AddRemoveComponentTest(TestCase):

    def testRemoveComponentFromWrongContainer(self, componentContainer=None):
        if componentContainer is None:
            containerClasses = MuntjacClasses.\
                getComponentContainersSupportingAddRemoveComponent()

            # No default constructor, special case
            containerClasses.remove(CustomLayout)
            self.testRemoveComponentFromWrongContainer(CustomLayout('dummy'))

            for c in containerClasses:
                self.testRemoveComponentFromWrongContainer( c() )
        else:
            hl = HorizontalLayout()
            label = Label()
            hl.addComponent(label)

            componentContainer.removeComponent(label)
            self.assertEquals(hl, label.getParent(), ('Parent no longer ' +
                    'correct for ' + componentContainer.__class__.__name__))


text:
int
magic(int value) {
  return value + 42;
}

unsigned
umagic(unsigned value) {
  return value + 42;
}


text:
package org.apache.hadoop.hive.serde2.lazybinary;

import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
import org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector;
import org.apache.hadoop.io.Text;

/**
 * The serialization of LazyBinaryString is very simple: start A end bytes[] ->
 * |---------------------------------|
 *
 * Section A is just an array of bytes which are exactly the Text contained in
 * this object.
 *
 */
public class LazyBinaryString extends
    LazyBinaryPrimitive<WritableStringObjectInspector, Text> {

  LazyBinaryString(WritableStringObjectInspector OI) {
    super(OI);
    data = new Text();
  }

  public LazyBinaryString(LazyBinaryString copy) {
    super(copy);
    data = new Text(copy.data);
  }

  @Override
  public void init(ByteArrayRef bytes, int start, int length) {
    assert (length > -1);
    data.set(bytes.getData(), start, length);
  }
}


text:
using Telerik.Charting;
using Windows.UI.Xaml;

namespace Telerik.UI.Xaml.Controls.Chart
{
    /// <summary>
    /// Defines an axis that treats distinct points as "Categories" rather than "Values".
    /// </summary>
    public class CategoricalAxis : CartesianAxis
    {
        /// <summary>
        /// Identifies the <see cref="GapLength"/> dependency property.
        /// </summary>
        public static readonly DependencyProperty GapLengthProperty =
            DependencyProperty.Register(nameof(GapLength), typeof(double), typeof(CategoricalAxis), new PropertyMetadata(0.3, OnGapLengthChanged));

        /// <summary>
        /// Identifies the <see cref="AutoGroup"/> dependency property.
        /// </summary>
        public static readonly DependencyProperty AutoGroupProperty =
            DependencyProperty.Register(nameof(AutoGroup), typeof(bool), typeof(CategoricalAxis), new PropertyMetadata(true, OnAutoGroupPropertyChanged));

        /// <summary>
        /// Identifies the <see cref="MajorTickInterval"/> dependency property.
        /// </summary>
        public static readonly DependencyProperty MajorTickIntervalProperty =
            DependencyProperty.Register(nameof(MajorTickInterval), typeof(int), typeof(CategoricalAxis), new PropertyMetadata(1, OnMajorTickIntervalPropertyChanged));

        /// <summary>
        /// Identifies the <see cref="PlotMode"/> dependency property.
        /// </summary>
        public static readonly DependencyProperty PlotModeProperty =
            DependencyProperty.Register(nameof(PlotMode), typeof(AxisPlotMode), typeof(CategoricalAxis), new PropertyMetadata(AxisPlotMode.BetweenTicks, OnPlotModePropertyChanged));

        /// <summary>
        /// Initializes a new instance of the <see cref="CategoricalAxis"/> class.
        /// </summary>
        public CategoricalAxis()
        {
            this.DefaultStyleKey = typeof(CategoricalAxis);
        }

        /// <summary>
        /// Gets or sets a value indicating whether the axis will perform its own
        /// grouping logic or it will consider each data point as a new group.
        /// </summary>
        public bool AutoGroup
        {
            get
            {
                return (this.model as CategoricalAxisModel).AutoGroup;
            }
            set
            {
                this.SetValue(AutoGroupProperty, value);
            }
        }

        /// <summary>
        /// Gets or sets the step at which ticks are positioned.
        /// </summary>
        public int MajorTickInterval
        {
            get
            {
                return (this.model as CategoricalAxisModel).MajorTickInterval;
            }
            set
            {
                this.SetValue(MajorTickIntervalProperty, value);
            }
        }

        /// <summary>
        /// Gets or sets the plot mode used to position points along the axis.
        /// </summary>
        public AxisPlotMode PlotMode
        {
            get
            {
                return (this.model as CategoricalAxisModel).PlotMode;
            }
            set
            {
                this.SetValue(PlotModeProperty, value);
            }
        }

        /// <summary>
        /// Gets or sets the gap (in the range [0, 1]) to be applied when calculating each plotted <see cref="CategoricalSeries"/> position.
        /// </summary>
        public double GapLength
        {
            get
            {
                return (this.model as CategoricalAxisModel).GapLength;
            }
            set
            {
                this.SetValue(GapLengthProperty, value);
            }
        }

        internal override AxisModel CreateModel()
        {
            return new CategoricalAxisModel();
        }

        private static void OnGapLengthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CategoricalAxis axis = d as CategoricalAxis;
            (axis.model as CategoricalAxisModel).GapLength = (double)e.NewValue;
        }

        private static void OnAutoGroupPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CategoricalAxis axis = d as CategoricalAxis;
            (axis.model as CategoricalAxisModel).AutoGroup = (bool)e.NewValue;
        }

        private static void OnMajorTickIntervalPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            CategoricalAxis axis = sender as CategoricalAxis;
            (axis.model as CategoricalAxisModel).MajorTickInterval = (int)args.NewValue;
        }

        private static void OnPlotModePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            CategoricalAxis axis = sender as CategoricalAxis;
            (axis.model as CategoricalAxisModel).PlotMode = (AxisPlotMode)args.NewValue;
        }
    }
}


text:
- Updated the Docker image to: *demisto/python3:3.9.7.24076*.
##### HelloWorld
- Updated the Docker image to: *demisto/python3:3.9.7.24076*.


text:
There are basically two ways to call the autocomplete on the input field

-	**With Javascript**
````html
<!-- settings are in js -->
<input type="text" id="with-js" />
<!-- called via js but settings in data object -->
<input type="text" id="with-default-js" data-sift-data="true" />
<script>
	var settings = {};
	$('input.with-js').autocomplete(settings);
	$('input.with-default-js').autocomplete();
</script>
````
-	**Without Javascript**
````html
<!-- default settings -->
<input type="text" data-jq-autocomplete />
<!-- custom settings in object -->
<input type="text" data-jq-autocomplete="{sift_data:true}" />
<!-- custom settings with data object -->
<input type="text" data-jq-autocomplete data-sift-data="true" />
````

# Settings

Key|Default|Description
---|-------|-----------
afterListing|function|function to call after data is loaded. Parameters are `ul` and data array where the `this` object is the input element.
beforeListing|function|Function to call before data is loaded. Parameters are `ul`, and data array where the `this` object is the input element
data|empty array|Array of data to autocomplete from
data_key|empty string|Key in the response object containing the data array
delay|300|Time in millisecond before autocomplete kicks in
list|function|Function to load each received data. Parameters are `li` and the data for the row where the `this` object is the input element.
method|get|Request method for ajax request. Url must be set
min_chars|3|Minimum characters before autocomplete kicks in
request_data|`{}`|Data to send with the request. Useful especially if method is `POST`
sift_data|`false`|Set to `true` if to check data against input string
url|empty string|Path from which to access the data
ul_class|empty string|The class to add to the ul of the displayed list

# Demo
Check the contained demo.html


text:
#pragma once
#include <aws/iot/IoT_EXPORTS.h>
#include <aws/iot/IoTRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace IoT
{
namespace Model
{

  /**
   */
  class AWS_IOT_API DescribeFleetMetricRequest : public IoTRequest
  {
  public:
    DescribeFleetMetricRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "DescribeFleetMetric"; }

    Aws::String SerializePayload() const override;

    /**
     *
The name of the fleet metric to describe.

     */
    inline const Aws::String& GetMetricName() const{ return m_metricName; }

    /**
     *
The name of the fleet metric to describe.

     */
    inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }

    /**
     *
The name of the fleet metric to describe.

     */
    inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }

    /**
     *
The name of the fleet metric to describe.

     */
    inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }

    /**
     *
The name of the fleet metric to describe.

     */
    inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }

    /**
     *
The name of the fleet metric to describe.

     */
    inline DescribeFleetMetricRequest& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}

    /**
     *
The name of the fleet metric to describe.

     */
    inline DescribeFleetMetricRequest& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}

    /**
     *
The name of the fleet metric to describe.

     */
    inline DescribeFleetMetricRequest& WithMetricName(const char* value) { SetMetricName(value); return *this;}

  private:

    Aws::String m_metricName;
    bool m_metricNameHasBeenSet = false;
  };

} // namespace Model
} // namespace IoT
} // namespace Aws


text:
Az alapértelmezettől eltérő böngésző-ablakokat és füleket a `@Window` annotáció segítségével érhetünk el. Az annotációt oldal-leíró vagy tesztlépés-könyvtár
típusú mezőre lehet tenni. Az annotáció értéke öröklődik azokra a hivatkozott oldal-leírókra, amik nem rendelkeznek külön annotációval.

Az annotáció értéke az ablak/fül (általunk adott) azonosítója. Egy böngésző fül azonosítója kettősponttal kezdődik. (Egy ablaké pedig kettőspont nélkül.)

## Újonnan megnyílt fül kezelése

Szituáció: a tesztelendő alkalmazás gombnyomásra új fület nyit, amibe betölt egy beviteli mezőt tartalmazó oldalt.
Az alkalmazás az alapértelmezett ablakban fut, az új oldal is itt nyílik meg, egy új fülön.

Az új fület megnyitó oldal:
```java
public class OpenerPage extends PageObject {

	@Find(by=By.ID, using="openNewTabButton")
	private WebElement openNewTabButton;

	public void open_new_tab() {
		doWith(openNewTabButton).click();
	}

}
```

A megnyílt fül oldal-leírója:
```java
public class OpenedPage extends PageObject {

	@Find(by=By.ID, using="checkedInputField")
	private WebElement checkedInputField;

	public void expect_that_page_is_opened() {
		expectations().expect(browser()).toBe().open();
	}

	public void expect_input_value_is(String value) {
		expectations().expect(checkedInputField).toHave().value(value);
	}

}
```

A tesztlépés-könyvtár a két oldal-leíróval:
```java
public class Steps extends StepLibrary {

	// az alapértelmezett ablakban, az alapértelmezett fülön fut
	private OpenerPage opener;

	// az alapértelmezett ablakban megnyílt új fülön fut
	@Window(":new-tab");
	private OpenedPage opened;

	public void expect_that_new_tab_can_be_opened() {
		opener.open_new_tab();
		opened.expect_that_page_is_opened();
		opened.expect_input_value_is("OK");
	}

}
```

## Tesztek futtatása egyszerre két ablakban

Szituáció: a tesztelendő alkalmazás két részből áll össze. A szerkesztőben tartamat tudunk szerkeszteni, míg a megtekintőben a tartalmat tekinthetjük meg. A két rész különböző URL-eken
érhető el. A szerkesztő ráadásul lassan töltődik be. Szeretnénk letesztelni, hogy amikor a szerkesztőben átírjuk a tartalmat, akkor az a megtekintőben is megváltozik. Mindezt szeretnénk
minél gyorsabban végrehajtani, ezért két külön böngészőablakot nyitunk, az egyikbe a szerkesztőt, a másikba a megtekintőt töltjük be.

A szerkesztő oldal:
```java
public class EditorPage extends PageObject {

	@Find(using="#header-field")
	private WebElement headerField;

	@Find(using="#footer-field")
	private WebElement footerField;

	@Find(using="#save")
	private WebElement saveButton;

	public void open() {
		browser().openURL("/editor");
	}

	public void set_header(String content) {
		doWith(headerField).setValue(content);
	}

	public void set_footer(String content) {
		doWith(footerField).setValue(content);
	}

	public void save() {
		doWith(saveButton).click();
	}

}
```

A megjelenítő oldal:
```java
public class ViewerPage extends PageObject {

	@Find(using="#header")
	private WebElement header;

	@Find(using="#footer")
	private WebElement footer;

	public void open() {
		browser().openURL("/viewer");
	}

	public void expect_header_content_is(String content) {
		expectations().expect(header).toHave().text(content);
	}

	public void expect_footer_content_is(String content) {
		expectations().expect(footer).toHave().text(content);
	}

}
```

A tesztlépés-könyvtár a két oldal-leíróval:
```java
public class Steps extends StepLibrary {

	// az alapértelmezett ablakban fut
	private EditorPage editor;

	// egy új ablakban fut
	@Window("viewer-window")
	private ViewerPage viewer;

	public void expect_that_header_and_footer_can_be_changed() {
		editor.open();

		viewer.open();
		viewer.expect_header_content_is("");
		viewer.expect_footer_content_is("");

		editor.set_header("Test Header");
		editor.save();

		viewer.open();
		viewer.expect_header_content_is("Test Header");
		viewer.expect_footer_content_is("");

		editor.set_footer("Test Footer");
		editor.save();

		viewer.open();
		viewer.expect_header_content_is("Test Header");
		viewer.expect_footer_content_is("Test Footer");
	}

}
```


text:
package org.apache.accumulo.core.client.impl;

import java.util.concurrent.TimeUnit;

import org.apache.accumulo.core.client.admin.DelegationTokenConfig;
import org.apache.accumulo.core.security.thrift.TDelegationTokenConfig;

/**
 * Handles serialization of {@link DelegationTokenConfig}
 */
public class DelegationTokenConfigSerializer {

  /**
   * Serialize the delegation token config into the thrift variant
   *
   * @param config
   *          The configuration
   */
  public static TDelegationTokenConfig serialize(DelegationTokenConfig config) {
    TDelegationTokenConfig tconfig = new TDelegationTokenConfig();
    tconfig.setLifetime(config.getTokenLifetime(TimeUnit.MILLISECONDS));
    return tconfig;
  }

  /**
   * Deserialize the Thrift delegation token config into the non-thrift variant
   *
   * @param tconfig
   *          The thrift configuration
   */
  public static DelegationTokenConfig deserialize(TDelegationTokenConfig tconfig) {
    DelegationTokenConfig config = new DelegationTokenConfig();
    if (tconfig.isSetLifetime()) {
      config.setTokenLifetime(tconfig.getLifetime(), TimeUnit.MILLISECONDS);
    }
    return config;
  }
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="tools.module.sd2xmltv"
       name="sd2xmltv"
       version="__VER__"
       provider-name="astrilchuk">
  <requires>
    <import addon="xbmc.python" version="2.1.0"/>

  </requires>
  <extension point="xbmc.python.script" library="default.py">
    <provides></provides>
  </extension>
  <extension point="xbmc.addon.metadata">
    <summary>Schedules Direct xmltv grabber</summary>
    <description>
Schedules Direct xmltv grabber using the JSON API
    </description>
    <disclaimer>

    </disclaimer>
    <platform>all</platform>
  </extension>
</addon>


text:
.breadcrumb {
    background-color: #63b020;
}
.breadcrumbs {
    margin: auto;
    background: #63b020;
    border: none;
    border-radius: 0;
    padding: 5px 50px;
}

.breadcrumbs li.current {
    color: #fff
}

.breadcrumbs li a, .breadcrumbs li:before {
    color: white;
}

.breadcrumbs .retour {
    border: 1px solid white;
    border-radius: 5px;
    color: white;
    margin: 0;
    padding: 0px 10px
}

.breadcrumbs .retour:before {
    content: none;
}

#header-content {
    text-align: center;
    margin: auto;
}

@media only screen and (min-width: 700px) {
    #header-content .header-menu {
        margin: auto;
        width: 1024px;
    }
}
#header {
    background: url('../images/header.png') center center no-repeat;
    height: 200px;
}

.header-home {
    background: url('../images/header_home.png') center center no-repeat !important;
    height: 550px !important;
}

.header-home form label {
    color: white !important;
}

.top-bar-canoe {
    padding-top: 10px;
    background-color: transparent;
}

.top-bar-canoe .left li a {
    font-size: 18px;
    text-transform: uppercase;
}

.top-bar .top-bar-section li {
    border-right: 0;
}

.top-bar-section ul li {
    background: transparent;
}

@media only screen and (min-width: 700px) {
    .top-bar .top-bar-section li:not(.has-form) a:not(.button) {
        background: transparent;
    }
}
@media only screen and (max-width: 700px) {
    .top-bar .top-bar-section li:not(.has-form) a:not(.button) {
        background: white;
        color: #63b020;
    }
}

.top-bar-canoe .top-bar-section .left {
    border: 1px solid white;
    border-radius: 5px;
}

.top-bar-canoe .top-bar-section .left li .active {
    background-color: white !important;
    color: green;
    margin-top: 7px;
    /*height: 30px;*/
    line-height: 30px;
    border-radius: 5px;
}
@media only screen and (max-width: 700px) {
    .top-bar-canoe .top-bar-section .left li .active {
        margin-top: 0;
        line-height: 30px;
        height: 53px;
    }
}

@media only screen and (max-width: 700px) {
    .header-home .headertitle {
        float: none !important;
        font-size: 55px;
        padding-top: 0px;
        text-shadow: 3px 3px 7px #000;
    }
}
@media only screen and (min-width: 700px) {
    .header-home .headertitle {
        float: none !important;
        font-size: 55px;
        padding-top: 140px;
        text-shadow: 3px 3px 7px #000;
    }
}

.headertitle {
    color: white;
    font-size: 30px;
    margin-right: 30px;
    margin-top: 0px;
}

.reseauxsociaux {
    margin-right: 30px;
    margin-top: 15px;
}

#content h1, #content_admin h1 {
    color: #63b020;
    font-size: 27px;
    text-align: center;
}

#content h2, #content_admin h2 {
    color: #2e3641;
    font-size: 24px;
    text-align: center;
}

#content h3, #content_admin h3 {
    color: #63b020;
    font-size: 24px;
}

.roundedImage {
    background-size: cover !important;
}

/* FRONT Liste RIVIERES */
.rivieres h1 {
    margin-top: 40px;
}
.rivieres h2 {
    margin-bottom: 40px;
}
.rivieres h3 {
    margin-bottom: 0px;
}

@media only screen and (max-width: 600px) {
    .bloc-riviere .roundedImage, .rivieres .roundedImage{
        height: 130px !important;
        width: 130px !important;
    }
}

.bloc-riviere .roundedImage, .rivieres .roundedImage{
    /*overflow: hidden;*/
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    height: 145px;
    width: 145px;
    margin-left: 10px;
    margin-top: 10px;
}

.bloc-riviere {
    border: 1px solid #63b020;
    border-radius: 10px;
    font-size: 12px;
    height: 200px;
    overflow: hidden;
}
.bloc-riviere h3 {
    font-size: 17px;
    font-weight: bold;
}
.bloc-riviere .caracteristiques, .bloc-riviere .caracteristiques1 {
    font-size: 13px;
    margin-bottom: 10px;
}
.bloc-riviere .caracteristiques {
    font-weight: bold;
}
.bloc-riviere .content {
    font-size: 13px;
    margin-bottom: 20px;
    height: 110px;
    overflow: hidden;
}
.bloc-riviere .description {
    font-size: 13px;
    height: 60px;
    overflow: hidden;
}
.bloc-riviere .description > * {
    font-family: 'Century Gothic', 'Open Sans', sans-serif !important;
    color: #2e3641 !important;
    font-size: 13px !important;
    text-align: justify !important;
    line-height: normal !important;
}

.bloc-riviere .fiche-suite {
    background: #63b020;
    border-radius: 0 0 10px 10px;
    font-size: 15px;
    position: absolute;
    text-align: right;
    width: 100%;
    bottom: 0;
}

.bloc-riviere .fiche-suite a {
    color: white;
}

.bloc-riviere .img-principale {
    max-height: 165px;
}

.img-principale {
    padding-top: 10px;
}

/* FRONT Détail RIVIERE */
.riviere {
    margin: 10px 0 !important;
}

.riviere h1 {
    color: #63b020;
    font-size: 27px;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
}
.riviere h3 {
    line-height: 24px;
    padding-top: 10px;
}
.riviere .title {
    color: #2e3641;
    font-size: 13px;
    text-align: justify;
    margin-bottom: 20px !important;
}

.riviere .description {
    font-size: 13px;
    margin-bottom: 40px;
}
.riviere .description > * {
    font-family: 'Century Gothic', 'Open Sans', sans-serif !important;
    color: #2e3641 !important;
    font-size: 13px !important;
    text-align: justify !important;
    line-height: normal !important;
}

.riviere .roundedImage{
    overflow: hidden;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    height: 90px;
    width: 90px;
    margin: 0 10px;
    border: 2px solid yellow;
    display: inline-block;
}

.riviere .photos-secondaires {
    text-align: center;
    width: 100%;
}

.riviere-autres {
    color: #63b020;
    display: block;
    font-size: 29px;
    margin: 40px 0;
    text-align: center;
}

/* FRONT Détail LOUEUR */
.loueur {
    background-color: #f2f2f2;
    margin: 10px 0 !important;
    padding: 20px 0 !important;
}

.loueur .roundedImage {
    overflow: hidden;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    height: 190px;
    width: 190px;
    margin: 0 10px;
    border: 10px solid #63b020;
}

.roundedImageLoueur {
    overflow: hidden;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    height: 70px;
    width: 70px;
    border: 2px solid #63b020;
    position: absolute;
    right: 0;
    margin-top: 80px;
}

.loueur h1 {
    color: #63b020;
    font-size: 27px;
    text-align: left !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
}
.loueur .description {
    font-size: 13px;
    padding-bottom: 20px;
}
.loueur .description > * {
    font-family: 'Century Gothic', 'Open Sans', sans-serif !important;
    color: #2e3641 !important;
    font-size: 13px !important;
    text-align: justify !important;
    line-height: normal !important;
}
.loueur .horaires > * {
    font-family: 'Century Gothic', 'Open Sans', sans-serif !important;
    color: #2e3641 !important;
    font-size: 13px !important;
    text-align: justify !important;
    line-height: normal !important;
}
.loueur .tel, .loueur .email, .loueur .address {
    background-color: white;
    border: 1px solid #63b020;
    border-radius: 8px;
}

.loueur .tel {
    font-size: 17px;
    font-weight: bold;
    padding: 2px 0;
}

.loueur .email, .loueur .address {
    font-size: 13px !important;
    padding: 5px 0;
}

.loueur .address a {
    color: #2e3641;
    font-size: 13px;
    margin-left: 50px;
}

.loueur .fa {
    color: #63b020;
}

.randonnees h3 {
    font-size: 20px !important;
    margin-bottom: 0 !important;
}

/* Footer */
#footer {
    background-color: #63b020;
    color: white;
    font-size: 11px;
    margin-top: 10px;
    text-align: center;
}

#footer .row {
    min-height: 60px;
    padding-top: 15px;
}
#footer .row a {
    color: white;
}

#footer .row .footer-copyright {
    padding: 25px;
    margin-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, .1);
    font-size: 11px
}

/* FRONT Détail Riviere Réseaux Sociaux */
.rs {
    min-height: 50px;
    padding-top: 20px;
    margin-bottom: 20px;
}

.rs .fb-like span {
    height: 25px !important;
}

/* FRONT Détail RANDONNEE */
.randonnee {
    padding-top: 20px;
}
.randonnee h1 {
    text-align: left !important;
}

.randonnee h2 {
    background-color: #63b020 !important;
    color: white !important;
    height: 60px;
    padding-top: 7px;
    font-size: 29px !important;
}
.randonnee .caracteristiques {
    font-size: 13px;
    margin-bottom: 10px;
}
.randonnee .description {
    font-size: 13px;
    margin-bottom: 20px;
}
.randonnee .description > * {
    font-family: 'Century Gothic', 'Open Sans', sans-serif !important;
    color: #2e3641 !important;
    font-size: 13px !important;
    text-align: justify !important;
    line-height: normal !important;
}

.randonnee .img-principale {
    position: relative;
}
.randonnee .img-principale .roundedImage {
    overflow: hidden;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    height: 240px;
    width: 240px;
    margin: 0 10px;
    border: 2px solid #f6e701;
}
.randonnee .roundedImageLoueur {
    margin-top: 0;
    margin-left: 150px;
    right: inherit;
    height: 100px;
    width: 100px;
    top: 160px;
}
.randonnee .roundedImage{
    overflow: hidden;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    height: 90px;
    width: 90px;
    margin: 0 10px;
    border: 2px solid yellow;
    display: inline-block;
}
.randonnee .photos-secondaires {
    text-align: center;
    width: 100%;
}

.randonnee .sous-bloc {
    background-color: #f2f2f2;
    font-size: 13px;
    padding: 10px;
    text-align: justify;
}
@media only screen and (min-width: 700px) {
    .randonnee .sous-bloc {
        min-height: 530px;
    }
}
.randonnee .sous-bloc .title {
    color: #2e3641;
    font-size: 13px;
    font-weight: bold;
}
.randonnee .sous-bloc .content {
    font-size: 13px;
    margin-bottom: 10px;
}
.randonnee .sous-bloc .urlsite {
    padding-top: 15px;
    text-align: center;
}
.randonnee .sous-bloc .urlsite a:hover {
    background-color: transparent !important;
}
.randonnee .randonnees-autres a {
    color: #63b020;
    display: block;
    font-size: 29px;
    margin: 40px 0;
    text-align: center;
}
@media only screen and (max-width: 700px) {
    .randonnee .randonnees-autres a {
        padding-top: 30px;
    }
}

.randonnee .randonnees-autres a:hover {
    background-color: transparent !important;
}

.randonnees_list button:hover, .randonnee button:hover, .randonnee a:hover {
/*    background-color: #63b020 !important;*/
}
.randonnees_list a:empty, .randonnee a.empty {
    padding-top: 15px !important;
    text-decoration: none;
}
.randonnees_list button.empty, .randonnee button.empty, .randonnee a.empty {
    background-color: #63b020;
    border: none;
    height: 50px;
    margin: 0;
    padding: 0;
    width: 100%;
}
.randonnees_list button.empty {
    height: 35px;
}
.randonnees_list input.empty, .randonnees_list button.empty,.randonnee input.empty, .randonnee button.empty {
    font-family: 'Open Sans', sans-serif, FontAwesome;
    font-style: normal;
    font-weight: normal;
    text-decoration: inherit;
}

/* FRONT List Randonnées */
.header-home .randonnees_list form {
    background-color: rgba(0, 0, 0, 0.50);
}
.randonnees_list form {
    background-color: #FF612D;
    padding: 10px 0px;
}
.randonnees_list form label {
    color: white !important;
    line-height: 25px !important;
}

.randonnees_list h1 {
    margin: 50px 0;
}

.randonnees_list select {
    height: 35px;
    padding: 5px;
    border-radius: 5px;
}

/* FRONT HOME */
@media only screen and (min-width: 700px) {
    .slider{
        min-height:300px;
    }
}
.home h1 {
    color: #63b020;
    font-size: 29px;
    margin-bottom: 0;
    margin-top: 20px;
}
.home h2 {
    color: #2e3641;
    font-size: 24px;
    margin-bottom: 30px;
    margin-top: 0px;
}
@media only screen and (max-width: 700px) {
    .home-rivieres {display: none;}
}

.home-rivieres {
    margin-bottom: 10px;
}
.home .steps {
    background-color: #f2f2f2;
    padding: 30px 0;
}
.home .steps .title {
    color: #63b020;
    font-size: 30px;
}
.home .steps .content {
    color: #2e3641;
    font-size: 15px;
    padding: 0 10px;
    text-align: justify;
}

.home .bloc-loueurs {
    padding-top: 30px;
    float: left;
    width: 100%;
}

.home .loueurs {
    diaply: inline-block;
    text-align: center;
    margin: auto;
    width: 100%;
}

.home .bloc-loueurs a {
    display: inline-block;
    width: 12.5%;
    margin: 0 10px;
    transition: all .3s ease-in;
}

@media only screen and (max-width: 700px) {
    .home .bloc-loueurs a {
        width: 25%;
    }
}

@media only screen and (max-width: 500px) {
    .home .bloc-loueurs a {
        width: 50%;
    }
}

@media only screen and (max-width: 300px) {
    .home .bloc-loueurs a {
        width: 100%;
    }
}

.home .bloc-loueurs a:hover, .home .bloc-loueurs a:focus {
    opacity:   .7;
    transform: translateY(-5px);
}

.home .circle {
    border-radius: 50%;
    display: inline-block;
    line-height: 120px;
    width: 140px;
    height: 140px;
    background: #f2f2f2;
    /*position: absolute;*/
    top: 0;
    left: 100px;
    border: 10px solid #f4f106;
}

.home #circle2 {
    line-height: 20px;
    padding-top: 35px;
}

/* Tested in Chrome 39, Firefox 35, Safari 7, IE 10-11 (degrades gracefully in IE 9)

/* Generic styles */

.card-flip {
    position: relative;
    height: 140px;
}

.card-flip-front,
.card-flip-back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transition: 0.6s;
    transition: 0.6s;
}

.card-flip-front {
    -webkit-transform: perspective(600px) rotateY(0deg);
    transform: perspective(600px) rotateY(0deg);

    z-index: 1; /* for IE 9 */
}
:hover > .card-flip-front {
    -webkit-transform: perspective(600px) rotateY(180deg);
    transform: perspective(600px) rotateY(180deg);
}

.card-flip-back {
    position: absolute;
    top: 0;
    margin: auto;
    text-align: center;
    width: 100%;
    -webkit-transform: perspective(600px) rotateY(-179deg);
    transform: perspective(600px) rotateY(-179deg);
}
:hover > .card-flip-back {
    -webkit-transform: perspective(600px) rotateY(0deg);
    transform: perspective(600px) rotateY(0deg);

    z-index: 2; /* for IE 9 */
}

.orbit-slide-number, .orbit-timer {
    display: none;
}

.orbit-container .orbit-slides-container {
    height: 300px !important;
    max-height: 300px !important;
}
.orbit-container .orbit-slides-container > * .orbit-caption {
    position: absolute;
    bottom: 0;
    background-color: rgba(51, 51, 51, .8);
    color: #FFF;
    width: 30%;
    padding: .625rem .875rem;
    font-size: .875rem;
    right: 0;
    height: 100%;
    text-align: center;
}

.orbit-bullets-container {
    text-align: center;
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30%;
}

.orbit-container .orbit-prev {
    left: 70%;
    bottom: 0;
    top: 70%;
}

.orbit-container .orbit-next {
    bottom: 0;
    top: 70%;
}

.orbit-riviere-title {
    font-size: 22px;
    color: #63b020;
    height: 50px;
}

.orbit-riviere-button {
    height: 140px;
}
.orbit-caption a.button {
    border-radius: 5px;
    font-size: 14px;
    padding: 10px;
}

.orbit-riviere-name {
    font-size: 18px;
}

.orbit-riviere-name a {
    color: white;
}

/* FRONT PAGE NOUS + NOS CONSEILS */
.page {
    margin:10px 0;
}
.page h1 {
    text-align: left !important;
}
.page div {
    text-align: justify;
}

.page .roundedImage{
    overflow: hidden;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    height: 400px;
    width: 400px;
    border: 2px solid yellow;
    display: inline-block;
}

.page-riviere-label {
    line-height: 40px;
}

/* SEARCH */
.search {
    margin: auto;
    background-color: white;
    color: black;
}
@media only screen and (min-width: 500px) {
    .search {
        height: 70px;
    }
}
.search label {
    color: black;
    /*line-height: 30px;*/
}
.search span {
    padding-top: 14px;
}
.search img {
    padding-top: 10px;
}
.search button {
    margin-top: 13px !important;
}


text:
package org.keycloak.subsystem.saml.as7.xml;

import java.util.Iterator;
import java.util.NoSuchElementException;

/**
 * @author David M. Lloyd
 */
final class Spliterator implements Iterator<String> {
    private final String subject;
    private final char delimiter;
    private int i;

    Spliterator(final String subject, final char delimiter) {
        this.subject = subject;
        this.delimiter = delimiter;
        i = 0;
    }

    static Spliterator over(String subject, char delimiter) {
        return new Spliterator(subject, delimiter);
    }

    public boolean hasNext() {
        return i != -1;
    }

    public String next() {
        final int i = this.i;
        if (i == -1) {
            throw new NoSuchElementException();
        }
        int n = subject.indexOf(delimiter, i);
        try {
            return n == -1 ? subject.substring(i) : subject.substring(i, n);
        } finally {
            this.i = n == -1 ? -1 : n + 1;
        }
    }

    public void remove() {
        throw new UnsupportedOperationException();
    }
}


text:
.class public final Landroid/media/MediaCodec$CodecException;
.super Ljava/lang/IllegalStateException;
.source "MediaCodec.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/media/MediaCodec;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "CodecException"
.end annotation

# static fields
.field private static final ACTION_RECOVERABLE:I = 0x2

.field private static final ACTION_TRANSIENT:I = 0x1

# instance fields
.field private final mActionCode:I

.field private final mDiagnosticInfo:Ljava/lang/String;

.field private final mErrorCode:I

# direct methods
.method constructor <init>(IILjava/lang/String;)V
    .locals 3
    .param p1, "errorCode"    # I
    .param p2, "actionCode"    # I
    .param p3, "detailMessage"    # Ljava/lang/String;

    .prologue
    .line 675
    invoke-direct {p0, p3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    .line 676
    iput p1, p0, Landroid/media/MediaCodec$CodecException;->mErrorCode:I

    .line 677
    iput p2, p0, Landroid/media/MediaCodec$CodecException;->mActionCode:I

    .line 680
    if-gez p1, :cond_0

    const-string/jumbo v0, "neg_"

    .line 681
    .local v0, "sign":Ljava/lang/String;
    :goto_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "android.media.MediaCodec.error_"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {p1}, Ljava/lang/Math;->abs(I)I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Landroid/media/MediaCodec$CodecException;->mDiagnosticInfo:Ljava/lang/String;

    .line 683
    return-void

    .line 680
    .end local v0    # "sign":Ljava/lang/String;
    :cond_0
    const-string v0, ""

    goto :goto_0
.end method

# virtual methods
.method public getDiagnosticInfo()Ljava/lang/String;
    .locals 1

    .prologue
    .line 721
    iget-object v0, p0, Landroid/media/MediaCodec$CodecException;->mDiagnosticInfo:Ljava/lang/String;

    return-object v0
.end method

.method public getErrorCode()I
    .locals 1

    .prologue
    .line 711
    iget v0, p0, Landroid/media/MediaCodec$CodecException;->mErrorCode:I

    return v0
.end method

.method public isRecoverable()Z
    .locals 2

    .prologue
    .line 700
    iget v0, p0, Landroid/media/MediaCodec$CodecException;->mActionCode:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public isTransient()Z
    .locals 2

    .prologue
    const/4 v0, 0x1

    .line 691
    iget v1, p0, Landroid/media/MediaCodec$CodecException;->mActionCode:I

    if-ne v1, v0, :cond_0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


text:
package com.google.checkstyle.test.chapter3filestructure.rule32packagestate;

import java.io.File;
import java.io.IOException;

import org.junit.BeforeClass;
import org.junit.Test;

import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck;

public class LineLengthTest extends BaseCheckTestSupport{

    static ConfigurationBuilder builder;

    @BeforeClass
    public static void setConfigurationBuilder() throws CheckstyleException, IOException {
        builder = new ConfigurationBuilder(new File("src/it/"));
    }

    @Test
    public void lineLengthTest() throws IOException, Exception {

        final String[] expected = {
            "5: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 112),
            "29: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 183),
            "46: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 131),
            "47: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 124),
            "48: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 113),
            "50: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 116),
            "53: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 131),
            "57: " + getCheckMessage(LineLengthCheck.class, "maxLineLen", 100, 116),
        };

        Configuration checkConfig = builder.getCheckConfig("LineLength");
        String filePath = builder.getFilePath("LineLengthInput2");

        Integer[] warnList = builder.getLinesWithWarn(filePath);
        verify(checkConfig, filePath, expected, warnList);
    }
}


text:
layout:       blog
title:        Veřejná správa prakticky
---

Dne 26. 2. 2019 se v prostorách Univerzity Pardubice konal 1. ročník Konference "Veřejná
správa prakticky" – setkání specialistů ICT měst a obcí, kterou pořádala Otevřená města spolu
s Univerzitou Pardubice.

Konference se věnovala především participativním technologiím, IoT a vybudování
infrastruktury pro IoT v Novém Městě na Moravě, knowledge managementu a sdílení,
CityVizoru a problematice GIS.

Cílem konference bylo, mimo jiné, také zmapování aktuálních problémů, se kterými se obce
potýkají a hledání jejich společných řešení a možností spolupráce.

> "Tato konference nám pomáhá odhalovat potřeby našich členských obcí a společně s jejich
> odborníky najít vhodný způsob spolupráce. Někdy je výhodné vyvinout software na míru,
> jindy je lepší cestou vyjednat slevu.", říká předseda spolku Otevřená města Ondřej Profant.
> "Náš úřad se potýká s mnoha problémy, se kterými mohou Otevřená města pomoci. Například
> aplikace Cityvizor zpřehledňuje prezentaci rozpočtu a jeho plnění občanům.", říká Pavel
> Kováč z úřadu městské části Prahy 5, účastník konference.

> "Mám radost, že se podařilo zapojit dvě univerzity (vedle Univerzity Pardubice i Masarykovu
> univerzitu, konkrétně KISK) a také naše přidružené členy a další subjekty. Bourají se bubliny
> a je to skvělá příležitost pro výměnu zkušeností, říká Ladislav Nešněra, člen výboru
> Otevřených měst." A dále doplňuje: "Akci vnímám jako spouštěč, nikoliv výsledek, protože ta
> hlavní práce bude teprve následovat. Aby se naplnil smysl konference jako příležitosti k
> setkání a katalyzátor praktických kroků. Spolek k tomu vytváří komunikační a technické
> zázemí, pomáháme s naplněním znalostní báze, ale těžiště je v samotných účastnících. A
> doufáme, že se budou postupně přidávat další. V tomto směru jdeme na nejzazší hranici
> možného, aby princip otevřenosti nezůstal jen v názvu konference nebo našeho spolku.
> V rámci konference proběhl pracovní workshop s cílem identifikovat skutečné problémy
> efektivního rozvoje IT měst a obcí. Jako nejpalčivější problémy účastníci konference označili
> problematiku uzamčení u dodavatele, přenositelnost dat a sdílení znalostí. Další v pořadí byly
> stesky na nedostatek kvalifikovaného personálu a na schopnosti specifikovat požadavky na
> potřebný SW, technická řešení a dlouhodobé strategie. Výrazně byla také patrná obava z
> právní problematiky."

Workshop zajišťoval Kabinet informačních studií a knihovnictví (KISK) - akademické
pracoviště Filozofické fakulty Masarykovy univerzity a Frank Bold (organizace právníků,
jejíž vizí je svobodná společnost), přidružený člen Otevřených měst. Z identifikovaných čtyř
desítek palčivých témat měli sami účastníci na dobrou třetinu odpověď, což jen podtrhuje
smysl a důležitost intenzivního předávání znalostí a vzájemné pomoci ve veřejné
správě/samosprávě případně vyvinutí koordinovaného úsilí tam, kde řešení leží mimo
možnosti jednotlivých aktérů.

Na základě pozitivních ohlasů zúčastněných obcí a skutečnosti, že Otevřená města považují
sdílení problémů měst a obcí a zkušeností s jejich řešením za obecně velmi přínosné, rozhodli
se organizátoři uspořádat tuto akci i v roce příštím.

Otevřená města jsou velmi vděčná Univerzitě Pardubice a především Fakultě ekonomicko
– správní za poskytnutí velmi reprezentativních a příhodných prostor a velkou vstřícnost a
pohostinnost.

Otevřená města jsou spolek měst, která prosazují otevřené fungování místní samosprávy,
zejména zveřejňování informací a otevřená data, otevřené zadávání veřejných zakázek,
zapojování veřejnosti do rozhodování, open source, otevřené technologie a standardy.