text:
<?php
	/*
	TODO
	no_index_used - difficult to simulate because server/engine dependent
	bad_index_used - difficult to simulate because server/engine dependent
	flushed_normal_sets
	flushed_ps_sets
	explicit_close
	implicit_close
	disconnect_close
	in_middle_of_command_close
	explicit_free_result
	implicit_free_result
	explicit_stmt_close
	implicit_stmt_close
	*/

	function mysqli_get_client_stats_assert_eq($field, $current, $expected, &$test_counter, $desc = "") {

		$test_counter++;
		if (is_array($current) && is_array($expected)) {
			if ($current[$field] !== $expected[$field]) {
				printf("[%03d] %s Expecting %s = %s/%s, got %s/%s\n",
					$test_counter, $desc,
					$field, $expected[$field], gettype($expected[$field]),
					$current[$field], gettype($current[$field]));
			}
		} else if (is_array($current)) {
			if ($current[$field] !== $expected) {
				printf("[%03d] %s Expecting %s = %s/%s, got %s/%s\n",
					$test_counter, $desc,
					$field, $expected, gettype($expected),
					$current[$field], gettype($current[$field]));
			}
		} else {
			if ($current !== $expected) {
				printf("[%03d] %s Expecting %s = %s/%s, got %s/%s\n",
					$test_counter, $desc,
					$field, $expected, gettype($expected),
					$current, gettype($current));
			}
		}

	}

	function mysqli_get_client_stats_assert_gt($field, $current, $expected, &$test_counter, $desc = "") {

		$test_counter++;
		if (is_array($current) && is_array($expected)) {
			if ($current[$field] <= $expected[$field]) {
				printf("[%03d] %s Expecting %s > %s/%s, got %s/%s\n",
					$test_counter, $desc,
					$field, $expected[$field], gettype($expected[$field]),
					$current[$field], gettype($current[$field]));
				}
		} else {
			if ($current <= $expected) {
				printf("[%03d] %s Expecting %s > %s/%s, got %s/%s\n",
					$test_counter, $desc, $field,
					$expected, gettype($expected),
					$current, gettype($current));
			}
		}

	}

	$tmp = $link = null;
	if (!is_null($tmp = @mysqli_get_client_stats($link)))
		printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);

	require_once("connect.inc");

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[002] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);

	var_dump($info);

	if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
		printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
			$host, $user, $db, $port, $socket);
		exit(1);
	}

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[004] Expecting array/any_non_empty, got %s/%s\n", gettype($new_info), $new_info);

	if (count($info) != count($new_info)) {
		printf("[005] Expecting the same number of entries in the arrays\n");
		var_dump($info);
		var_dump($new_info);
	}

	$test_counter = 6;

	mysqli_get_client_stats_assert_gt('bytes_sent', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_gt('bytes_received', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_gt('packets_sent', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_gt('packets_received', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_gt('protocol_overhead_in', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_gt('protocol_overhead_out', $new_info, $info, $test_counter);

	// we assume the above as tested and in the following we check only those
	mysqli_get_client_stats_assert_eq('result_set_queries', $new_info, $info, $test_counter);

	/* we need to skip this test in unicode - we send set names utf8 during mysql_connect */
	if (!(version_compare(PHP_VERSION, '6.0', '==') == 1))
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_eq('buffered_sets', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_eq('unbuffered_sets', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_eq('ps_buffered_sets', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_eq('ps_unbuffered_sets', $new_info, $info, $test_counter);

	mysqli_get_client_stats_assert_eq('rows_skipped_ps', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_eq('copy_on_write_saved', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_eq('copy_on_write_performed', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_eq('command_buffer_too_small', $new_info, $info, $test_counter);
	// This is not a mistake that I use %unicode|string%(1) "1" here! Andrey did not go for int to avoid any
	// issues for very large numbers and 32 vs. 64bit systems
	mysqli_get_client_stats_assert_eq('connect_success', $new_info, "1", $test_counter);
	mysqli_get_client_stats_assert_eq('connect_failure', $new_info, $info, $test_counter);
	mysqli_get_client_stats_assert_eq('connection_reused', $new_info, $info, $test_counter);

	// No data fetched so far
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $new_info, "0", $test_counter);
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $new_info, "0", $test_counter);

	require('table.inc');
	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	// fetch stats
	$expected = $info;

	// buffered normal
	print "Testing buffered normal...\n";
	if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS _num FROM test', MYSQLI_STORE_RESULT))
		printf("[%03d] SELECT COUNT() FROM test failed, [%d] %s\n",
			++$test_counter, mysqli_errno($link), mysqli_error($link));

	$expected['rows_fetched_from_server_normal'] = (string)($expected['rows_fetched_from_server_normal'] + 1);
	$expected['buffered_sets'] = (string)($expected['buffered_sets'] + 1);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);
	$expected['rows_buffered_from_client_normal'] = (string)($expected['rows_buffered_from_client_normal'] + 1);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_gt('bytes_sent', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_gt('bytes_received', $info, $expected, $test_counter);

	// real_data_* get incremented after mysqli_*fetch*()
    mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, "0", $test_counter);
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, "0", $test_counter);

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_normal_buffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('buffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_normal', $info, $expected, $test_counter);

	/* no change to rows_fetched_from_client_normal_buffered! */
	if (!$row = mysqli_fetch_assoc($res))
		printf("[%03d] fetch_assoc - SELECT COUNT() FROM test failed, [%d] %s\n",
			++$test_counter, mysqli_errno($link), mysqli_error($link));

	$expected['rows_fetched_from_client_normal_buffered'] = (string)($expected['rows_fetched_from_client_normal_buffered'] + 1);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	// fetch will increment
	mysqli_get_client_stats_assert_gt('bytes_received_real_data_normal', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_normal'] = $info['bytes_received_real_data_normal'];
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, "0", $test_counter);

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_normal_buffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_normal', $info, $expected, $test_counter);

	$num_rows = $row['_num'];
	mysqli_free_result($res);

	print "Testing buffered normal... - SELECT id, label FROM test\n";
	if (!$res = mysqli_query($link, 'SELECT id, label FROM test', MYSQLI_STORE_RESULT))
		printf("[%03d] SELECT id, label FROM test failed, [%d] %s\n",
			++$test_counter, mysqli_errno($link), mysqli_error($link));

	assert(mysqli_num_rows($res) == $num_rows);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	$expected['rows_fetched_from_server_normal'] = (string)($expected['rows_fetched_from_server_normal'] + $num_rows);
	$expected['rows_buffered_from_client_normal'] = (string)($expected['rows_buffered_from_client_normal'] + $num_rows);
	$expected['buffered_sets'] = (string)($expected['buffered_sets'] + 1);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, $expected, $test_counter);

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_normal_buffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('buffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_normal', $info, $expected, $test_counter);

	/* fetching none, but stats should not be affected - current implementation */
	mysqli_free_result($res);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_normal_buffered', $info, $expected, $test_counter);

	print "Testing unbuffered normal...\n";
	if (!$res = mysqli_query($link, 'SELECT id, label FROM test', MYSQLI_USE_RESULT))
		printf("[%03d] SELECT id, label FROM test failed, [%d] %s\n",
			++$test_counter, mysqli_errno($link), mysqli_error($link));

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_normal_unbuffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, $expected, $test_counter);

	while ($row = mysqli_fetch_assoc($res))
		;
	mysqli_free_result($res);

	$expected['rows_fetched_from_server_normal'] = (string)($expected['rows_fetched_from_server_normal'] + $num_rows);
	$expected['rows_fetched_from_client_normal_unbuffered'] = (string)($expected['rows_fetched_from_client_normal_unbuffered'] + $num_rows);
	$expected['unbuffered_sets'] = (string)($expected['unbuffered_sets'] + 1);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_gt('bytes_received_real_data_normal', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_normal'] = $info['bytes_received_real_data_normal'];

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_normal_unbuffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('unbuffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);

	print "Testing unbuffered normal... - SELECT id, label FROM test, not all fetched\n";
	if (!$res = mysqli_query($link, 'SELECT id, label FROM test', MYSQLI_USE_RESULT))
		printf("[%03d] SELECT id, label FROM test failed, [%d] %s\n",
			++$test_counter, mysqli_errno($link), mysqli_error($link));

	for ($i = 0; $i < $num_rows - 1; $i++)
		$row = mysqli_fetch_assoc($res);

	$expected['rows_fetched_from_server_normal'] = (string)($expected['rows_fetched_from_server_normal'] + $num_rows - 1);
	$expected['rows_fetched_from_client_normal_unbuffered'] = (string)($expected['rows_fetched_from_client_normal_unbuffered'] + $num_rows - 1);
	$expected['unbuffered_sets'] = (string)($expected['unbuffered_sets'] + 1);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_gt('bytes_received_real_data_normal', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_normal'] = $info['bytes_received_real_data_normal'];

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_normal_unbuffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('unbuffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);

	print "Testing if implicit fetching and cleaning happens...\n";
	mysqli_free_result($res);

	/* last row has been implicitly cleaned from the wire by freeing the result set */
	$expected['rows_fetched_from_server_normal'] = (string)($expected['rows_fetched_from_server_normal'] + 1);
	$expected['rows_fetched_from_client_normal_unbuffered'] = (string)($expected['rows_fetched_from_client_normal_unbuffered'] + 1);
	$expected['rows_skipped_normal'] = (string)($info['rows_skipped_normal'] + 1);
	$expected['flushed_normal_sets'] = (string)($expected['flushed_normal_sets'] + 1);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, $expected, $test_counter);

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_normal_unbuffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_skipped_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('flushed_normal_sets', $info, $expected, $test_counter);

	print "Testing buffered Prepared Statements...\n";
	if (!$stmt = mysqli_stmt_init($link))
		printf("[%03d] stmt_init() failed, [%d] %s\n",
			++$test_counter, mysqli_errno($link), mysqli_error($link));

	if (!mysqli_stmt_prepare($stmt, 'SELECT id, label FROM test') ||
			!mysqli_stmt_execute($stmt))
		printf("[%03d] prepare/execute failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	/* by default PS is unbuffered - no change */
	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_ps', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_ps_buffered', $info, $expected, $test_counter);

	if (!mysqli_stmt_store_result($stmt))
		printf("[%03d] store_result failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
	mysqli_stmt_free_result($stmt);

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, "0", $test_counter);
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, $expected, $test_counter);

	$expected['rows_fetched_from_server_ps'] = (string)($expected['rows_fetched_from_server_ps'] + $num_rows);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);
	$expected['ps_buffered_sets'] = (string)($expected['ps_buffered_sets'] + 1);
	$expected['rows_buffered_from_client_ps'] = (string)($expected['rows_buffered_from_client_ps'] + $num_rows);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_ps', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_ps_buffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('ps_buffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_ps', $info, $expected, $test_counter);

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, "0", $test_counter);

	print "Testing buffered Prepared Statements... - fetching all\n";

	if (!mysqli_stmt_prepare($stmt, 'SELECT id, label FROM test') ||
			!mysqli_stmt_execute($stmt))
		printf("[%03d] prepare/execute failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	$id = $label = null;
	if (!mysqli_stmt_bind_result($stmt, $id, $label))
		printf("[%03d] bind_result failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	if (!mysqli_stmt_store_result($stmt))
		printf("[%03d] store_result failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	while (mysqli_stmt_fetch($stmt))
		;

	$expected['rows_fetched_from_server_ps'] = (string)($expected['rows_fetched_from_server_ps'] + $num_rows);
	$expected['rows_fetched_from_client_ps_buffered'] = (string)($expected['rows_fetched_from_client_ps_buffered'] + $num_rows);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);
	$expected['ps_buffered_sets'] = (string)($expected['ps_buffered_sets'] + 1);
	$expected['rows_buffered_from_client_ps'] = (string)($expected['rows_buffered_from_client_ps'] + $num_rows);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_gt('bytes_received_real_data_ps', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_ps'] = $info['bytes_received_real_data_ps'];

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_ps', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_ps_buffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('ps_buffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_ps', $info, $expected, $test_counter);

	mysqli_stmt_free_result($stmt);

	print "Testing buffered Prepared Statements... - fetching all but one\n";

	if (!mysqli_stmt_prepare($stmt, 'SELECT id, label FROM test') ||
			!mysqli_stmt_execute($stmt))
		printf("[%03d] prepare/execute failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	$id = $label = null;
	if (!mysqli_stmt_bind_result($stmt, $id, $label))
		printf("[%03d] bind_result failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	if (!mysqli_stmt_store_result($stmt))
		printf("[%03d] store_result failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	for ($i = 0; $i < $num_rows - 1; $i++)
		mysqli_stmt_fetch($stmt);

	$expected['rows_fetched_from_server_ps'] = (string)($expected['rows_fetched_from_server_ps'] + $num_rows);
	$expected['rows_fetched_from_client_ps_buffered'] = (string)($expected['rows_fetched_from_client_ps_buffered'] + $num_rows - 1);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);
	$expected['ps_buffered_sets'] = (string)($expected['ps_buffered_sets'] + 1);
	$expected['rows_buffered_from_client_ps'] = (string)($expected['rows_buffered_from_client_ps'] + $num_rows);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_gt('bytes_received_real_data_ps', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_ps'] = $info['bytes_received_real_data_ps'];

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_ps', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_ps_buffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('ps_buffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_ps', $info, $expected, $test_counter);

	$expected['rows_skipped_ps'] = $info['rows_skipped_ps'];
	mysqli_stmt_free_result($stmt);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	/* buffered result set - no skipping possible! */
	mysqli_get_client_stats_assert_eq('rows_skipped_ps', $info, $expected, $test_counter);

	print "Testing unbuffered Prepared Statements... - fetching all\n";

	if (!mysqli_stmt_prepare($stmt, 'SELECT id, label FROM test') ||
			!mysqli_stmt_execute($stmt))
		printf("[%03d] prepare/execute failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	$id = $label = null;
	if (!mysqli_stmt_bind_result($stmt, $id, $label))
		printf("[%03d] bind_result failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	$i = 0;
	while (mysqli_stmt_fetch($stmt))
		$i++;
	assert($num_rows = $i);

	$expected['rows_fetched_from_server_ps'] = (string)($expected['rows_fetched_from_server_ps'] + $num_rows);
	$expected['rows_fetched_from_client_ps_unbuffered'] = (string)($expected['rows_fetched_from_client_ps_unbuffered'] + $num_rows);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);
	$expected['ps_unbuffered_sets'] = (string)($expected['ps_unbuffered_sets'] + 1);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_gt('bytes_received_real_data_ps', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_ps'] = $info['bytes_received_real_data_ps'];

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_ps', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_ps_unbuffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('ps_unbuffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_ps', $info, $expected, $test_counter);

	mysqli_stmt_free_result($stmt);

	print "Testing unbuffered Prepared Statements... - fetching all but one\n";

	if (!mysqli_stmt_prepare($stmt, 'SELECT id, label FROM test') ||
			!mysqli_stmt_execute($stmt))
		printf("[%03d] prepare/execute failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	$id = $label = null;
	if (!mysqli_stmt_bind_result($stmt, $id, $label))
		printf("[%03d] bind_result failed, [%d] %s\n",
			++$test_counter, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));

	for ($i = 0; $i < $num_rows - 1; $i++)
		mysqli_stmt_fetch($stmt);

	$expected['rows_fetched_from_server_ps'] = (string)($expected['rows_fetched_from_server_ps'] + $num_rows - 1);
	$expected['rows_fetched_from_client_ps_unbuffered'] = (string)($expected['rows_fetched_from_client_ps_unbuffered'] + $num_rows - 1);
	$expected['result_set_queries'] = (string)($expected['result_set_queries'] + 1);
	$expected['ps_unbuffered_sets'] = (string)($expected['ps_unbuffered_sets'] + 1);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_gt('bytes_received_real_data_ps', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_ps'] = $info['bytes_received_real_data_ps'];

	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_ps', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_client_ps_unbuffered', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('result_set_queries', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('ps_unbuffered_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_buffered_from_client_ps', $info, $expected, $test_counter);

	mysqli_stmt_free_result($stmt);
	$expected['rows_skipped_ps'] = (string)($expected['rows_skipped_ps'] + 1);
	$expected['flushed_ps_sets'] = (string)($expected['flushed_ps_sets'] + 1);
	$expected['rows_fetched_from_server_ps'] = (string)($expected['rows_fetched_from_server_ps'] + 1);

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, $expected, $test_counter);

	mysqli_get_client_stats_assert_eq('rows_skipped_ps', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('flushed_ps_sets', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('rows_fetched_from_server_ps', $info, $expected, $test_counter);

	/*
	print "Checking for normal buffered side effects...\n";
	foreach ($info as $k => $v)
		if ($info[$k] != $expected[$k])
			printf("$k - $v != %s\n", $expected[$k]);
	*/
	print "... done with fetch statistics\n";

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, $expected, $test_counter);

	//
	// result_set_queries statistics
	//

	if (!is_array($info = mysqli_get_client_stats()) || empty($info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($info), $info);

	if (!$res = mysqli_query($link, "SELECT id, label FROM test"))
		printf("[%03d] SELECT failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	$rows = 0;
	while ($row = mysqli_fetch_assoc($res))
		$rows++;

	if (0 == $rows)
		printf("[%03d] Expecting at least one result, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	mysqli_free_result($res);

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);

	mysqli_get_client_stats_assert_eq('result_set_queries', $new_info, (string)($info['result_set_queries'] + 1), $test_counter);
	$info = $new_info;

	mysqli_get_client_stats_assert_gt('bytes_received_real_data_normal', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_normal'] = $info['bytes_received_real_data_normal'];

	//
	// non_result_set_queries - DDL
	//

	// CREATE TABLE, DROP TABLE
	if (!mysqli_query($link, "DROP TABLE IF EXISTS non_result_set_queries_test"))
		printf("[%03d] DROP TABLE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!mysqli_query($link, "CREATE TABLE non_result_set_queries_test(id INT) ENGINE = " . $engine)) {
		printf("[%03d] CREATE TABLE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));
	} else {
		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 2), $test_counter, 'CREATE/DROP TABLE');
	}
	$info = $new_info;

	// ALERT TABLE
	if (!mysqli_query($link, "ALTER TABLE non_result_set_queries_test ADD label CHAR(1)")) {
		printf("[%03d] ALTER TABLE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));
	} else {
		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'ALTER TABLE');
	}
	$info = $new_info;

	// CREATE INDEX, DROP INDEX
	if (!mysqli_query($link, "CREATE INDEX idx_1 ON non_result_set_queries_test(id)")) {
		printf("[%03d] CREATE INDEX failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));
	} else {

		if (!mysqli_query($link, "DROP INDEX idx_1 ON non_result_set_queries_test"))
			printf("[%03d] DROP INDEX failed, [%d] %s\n", ++$test_counter,
				mysqli_errno($link), mysqli_error($link));

		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 2), $test_counter, 'DROP INDEX');
	}
	$info = $new_info;

	// RENAME TABLE
	if (!mysqli_query($link, "DROP TABLE IF EXISTS client_stats_test"))
		printf("[%03d] Cleanup, DROP TABLE client_stats_test failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	$info = $new_info;

	if (!mysqli_query($link, "RENAME TABLE non_result_set_queries_test TO client_stats_test")) {
		printf("[%03d] RENAME TABLE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	} else {
		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'RENAME TABLE');

	}
	$info = $new_info;

	if (!mysqli_query($link, "DROP TABLE IF EXISTS non_result_set_queries_test"))
		printf("[%03d] Cleanup, DROP TABLE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!mysqli_query($link, "DROP TABLE IF EXISTS client_stats_test"))
		printf("[%03d] Cleanup, DROP TABLE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	// Let's see if we have privileges for CREATE DATABASE
	mysqli_query($link, "DROP DATABASE IF EXISTS mysqli_get_client_stats");
	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	$info = $new_info;

	// CREATE, ALTER, RENAME, DROP DATABASE
	if (mysqli_query($link, "CREATE DATABASE mysqli_get_client_stats")) {

		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'CREATE DATABASE');
		$info = $new_info;

		if (!mysqli_query($link, "ALTER DATABASE DEFAULT CHARACTER SET latin1"))
			printf("[%03d] ALTER DATABASE failed, [%d] %s\n", ++$test_counter,
				mysqli_errno($link), mysqli_error($link));

		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'CREATE DATABASE');
		$info = $new_info;

		if (mysqli_get_server_version($link) > 51700) {
			if (!mysqli_query($link, "RENAME DATABASE mysqli_get_client_stats TO mysqli_get_client_stats_"))
				printf("[%03d] RENAME DATABASE failed, [%d] %s\n", ++$test_counter,
					mysqli_errno($link), mysqli_error($link));

			if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
				printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
					++$test_counter, gettype($new_info), $new_info);
			mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'CREATE DATABASE');
			$info = $new_info;
		} else {
			if (!mysqli_query($link, "CREATE DATABASE mysqli_get_client_stats_"))
				printf("[%03d] CREATE DATABASE failed, [%d] %s\n", ++$test_counter,
					mysqli_errno($link), mysqli_error($link));
			if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
				printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
					++$test_counter, gettype($new_info), $new_info);
			$info = $new_info;
		}

		if (!mysqli_query($link, "DROP DATABASE mysqli_get_client_stats_"))
			printf("[%03d] DROP DATABASE failed, [%d] %s\n", ++$test_counter,
				mysqli_errno($link), mysqli_error($link));

		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'DROP DATABASE');
		$info = $new_info;
	}

	// CREATE SERVER, ALTER SERVER, DROP SERVER
	// We don't really try to use federated, we just want to see if the syntax works
	mysqli_query($link, "DROP SERVER IF EXISTS myself");

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	$info = $new_info;

	$sql = sprintf("CREATE SERVER myself FOREIGN DATA WRAPPER mysql OPTIONS (user '%s', password '%s', database '%s')",
		$user, $passwd, $db);
	if (mysqli_query($link, $sql)) {
		// server knows about it

		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);

		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'CREATE SERVER');
		$info = $new_info;

		if (!mysqli_query($link, sprintf("ALTER SERVER myself OPTIONS(user '%s_')", $user)))
			printf("[%03d] ALTER SERVER failed, [%d] %s\n", ++$test_counter,
				mysqli_errno($link), mysqli_error($link));

		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'ALTER SERVER');
		$info = $new_info;

		if (!mysqli_query($link, "DROP SERVER myself"))
			printf("[%03d] DROP SERVER failed, [%d] %s\n", ++$test_counter,
				mysqli_errno($link), mysqli_error($link));

		if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
			printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
		mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'DROP SERVER');
		$info = $new_info;
	}

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, $expected, $test_counter);

	/*
	We don't test the NDB ones.
	13.1. Data Definition Statements
	13.1.3. ALTER LOGFILE GROUP Syntax
	13.1.4. ALTER TABLESPACE Syntax
	13.1.9. CREATE LOGFILE GROUP Syntax
	13.1.10. CREATE TABLESPACE Syntax
	13.1.15. DROP LOGFILE GROUP Syntax
	13.1.16. DROP TABLESPACE Syntax
	*/

	//
	// DML
	//
	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
				++$test_counter, gettype($new_info), $new_info);
	$info = $new_info;

	if (!mysqli_query($link, "INSERT INTO test(id) VALUES (100)"))
		printf("[%03d] INSERT failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'INSERT');
	$info = $new_info;

	if (!mysqli_query($link, "UPDATE test SET label ='z' WHERE id = 100"))
		printf("[%03d] UPDATE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'UPDATE');
	$info = $new_info;

	if (!mysqli_query($link, "REPLACE INTO test(id, label) VALUES (100, 'b')"))
		printf("[%03d] INSERT failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'REPLACE');
	$info = $new_info;

	// NOTE: this will NOT update dbl_ddls counter
	if (!$res = mysqli_query($link, "SELECT id, label FROM test WHERE id = 100"))
		printf("[%03d] SELECT@dml failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));
	mysqli_free_result($res);

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, $info, $test_counter, 'SELECT@dml');
	$info = $new_info;

	if (!mysqli_query($link, "DELETE FROM test WHERE id = 100"))
		printf("[%03d] DELETE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'DELETE');
	$info = $new_info;

	if (!$res = mysqli_query($link, "TRUNCATE TABLE test"))
		printf("[%03d] TRUNCATE failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'TRUNCATE');
	$info = $new_info;

	$file = tempnam(sys_get_temp_dir(), 'mysqli_test');
	if ($fp = fopen($file, 'w')) {
		@fwrite($fp, '1;"a"');
		fclose($fp);
		chmod($file, 0644);
		$sql = sprintf('LOAD DATA LOCAL INFILE "%s" INTO TABLE test', mysqli_real_escape_string($link, $file));
		if (mysqli_query($link, $sql)) {
			if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
				printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
					++$test_counter, gettype($new_info), $new_info);
			mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'LOAD DATA LOCAL');
			$info = $new_info;
		}
		unlink($file);
	}

	mysqli_get_client_stats_assert_eq('bytes_received_real_data_normal', $info, $expected, $test_counter);
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, $expected, $test_counter);

	/*
	We skip those:
	13.2. Data Manipulation Statements
	13.2.2. DO Syntax
	13.2.3. HANDLER Syntax
	13.2.5. LOAD DATA INFILE Syntax
	*/
	mysqli_query($link, "DELETE FROM test");
	if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a'), (2, 'b')"))
		printf("[%03d] Cannot insert new records, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
		printf("[%03d] Cannot SELECT with mysqli_real_query(), [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!is_object($res = mysqli_use_result($link)))
		printf("[%03d] mysqli_use_result() failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	while ($row = mysqli_fetch_assoc($res))
		;
	mysqli_free_result($res);
	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	mysqli_get_client_stats_assert_eq('unbuffered_sets', $new_info, (string)($info['unbuffered_sets'] + 1), $test_counter, 'mysqli_use_result()');
	$info = $new_info;

	if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
		printf("[%03d] Cannot SELECT with mysqli_real_query() II, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	if (!is_object($res = mysqli_store_result($link)))
		printf("[%03d] mysqli_use_result() failed, [%d] %s\n", ++$test_counter,
			mysqli_errno($link), mysqli_error($link));

	while ($row = mysqli_fetch_assoc($res))
		;
	mysqli_free_result($res);
	if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
		printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
			++$test_counter, gettype($new_info), $new_info);
	mysqli_get_client_stats_assert_eq('buffered_sets', $new_info, (string)($info['buffered_sets'] + 1), $test_counter, 'mysqli_use_result()');
	$info = $new_info;

	mysqli_close($link);

	mysqli_get_client_stats_assert_gt('bytes_received_real_data_normal', $info, $expected, $test_counter);
	$expected['bytes_received_real_data_normal'] = $info['bytes_received_real_data_normal'];
	mysqli_get_client_stats_assert_eq('bytes_received_real_data_ps', $info, $expected, $test_counter);

	/*
	no_index_used
	bad_index_used
	flushed_normal_sets
	flushed_ps_sets
	explicit_close
	implicit_close
	disconnect_close
	in_middle_of_command_close
	explicit_free_result
	implicit_free_result
	explicit_stmt_close
	implicit_stmt_close
	*/

	print "done!";
?>


text:
Join CBSNews.com
By Charlie D'Agata CBS News March 20, 2019, 6:41 PM
Not a single ISIS flag is flying as far as the eye can see in eastern Syria
Trump says end of ISIS is near
Baghouz, Syria — President Trump on Wednesday showed off two maps of Syria, one from Election Day 2016, with ISIS-held territory marked in red. The other shows that just a spec of it remains. The president said it will be "gone by tonight."
Inside eastern Syria, the guns fell silent across the battlefield Wednesday. The U.S.-backed Syrian Democratic Forces said aside from a few "pockets of resistance," ISIS is done.
After weeks of heavy fighting, it's finally come down to a smouldering scrapheap on the banks of the Euphrates River. At least as long as CBS News has been here, there have been no sound of gunfire going in, or coming out.
SDF soldiers toured the camp of ISIS' last stand, where they said they found an extensive network of tunnels below. So what comes next? Aside from cleaning up all of the destruction, the entire area has to be cleared of booby traps, in buildings and bombs in the road.
But already ISIS has transitioned into an insurgent group, launching ambushes and suicide bombings. As a territorial force, ISIS' reign of terror over nearly 10 million people has come to an end. For the first time in more than four years, not a single ISIS flag is flying for as far as the eye can see.
Anticipating victory over ISIS, U.S. allies celebrate early
Watch CBS News anytime, anywhere with the our 24/7 digital news network. Stream CBSN live or on demand for FREE on your TV, computer, tablet, or smartphone.
A Twitter List by CBS News
Popular On CBS News
"Apollo on steroids": NASA's mission to get back to the moon
Eerie underwater photos of USS Hornet wreckage
Live Through This: Telling the stories of suicide survivors
"Information Wanted"

redpajama_set_name: RedPajamaCommonCrawl


Case Study #4 - At 62 Years Young, Farrell Richards Got Into The Best Shape of His Life!
Building Muscle 101's personal training program works! We've helped men and women off all ages, backgrounds, gender and activity reach their physical goals. Here's a story about one of my clients, Farrell Richards.
Farrell is 62 years young and in just 4 months has gotten into the best shape of his life using Building Muscle 101's personal training program. He looks like a man half his age! Farrell is absolute proof that no matter how old you are, you can get into the best shape of your life!
When Farrell contacted me back in January he wanted to get bigger, stronger and stay nice and lean. He wanted to get rid of his gut, get stronger and feel (and look) 20 years younger. At the time, Farrell was floating around from workout to workout trying to find a workout that would work for his daily schedule, age, fitness level and equipment. He just couldn't find a workout that delivered any solid results. When he first contacted me he originally wanted me to create a workout plan for him. I created a custom workout for Farrell which he enjoyed immensely. After following the plan for a month he decided to join my personal training program.
Over the years, Farrell has acquired some home gym equipment which he needed guidance and coaching on using. Since Farrell is retired so I put together a program that utilized the available equipment and worked with his daily schedule. Given his goals and age (62 years young) I developed a program that used movements that didn't aggravate certain body parts while making sure he progressively and consistently improved in movements that "agreed" with his body. Using this approach I was able to stay in line with his goals of becoming more muscular, stronger and leaner.
I had to make sure I used exercises that didn't put his body at risk but also allowed him to consistently get stronger. I used 2 exercises per body part incorporating all of his available equipment. Farrell stated that he wanted to get more muscular in the process so I had to be very careful about how I structured his nutrition plan. I decided to use a 1,700 daily calorie protocol using a balanced nutrition approach. What I wanted to do was sync up his diet and training so that each complimented each other.
Using two to three exercises per body part I started to use implement some intensity boosting methods to help ensure his body kept progressing (without using super heavy weight). I also kept in mind that I had to stay away from exercises that might put his body at risk and keep an eye on the amount of weight being used.
Farrell made outstanding progress and here he is after his phase 2 program.
Farrell needed to lose an additional 6 pounds to get down to his goal weight of 160 pounds so I decided to use a more advanced training and nutrition program. I eliminated all starches from his diet and reduced his daily calorie consumption to 1,250. I also reduced his sodium intake to less than 1.5 grams per day and increased his protein to about .9 grams per pound of body weight. I know from experience that at this stage it's all about nutrient timing in order to keep losing body fat and gaining muscle mass. I decided to introduce certain nutrients at certain times during the day to keep his body growing while reducing fat levels.
I implanted certain intensity boosting strategies such as tri sets, giant sets, pre-exhaust and my own custom methods. I also introduced two new supplements into his program because I knew that his body would respond almost immediately given the fact that he was really starting to kick into high gear. One was a pre-workout and the other a fat burner. The result was simply extraordinary! He reached his goal weight of 160 pounds and reduced his body fat percentage from 22% to 16%. Here are his photos after his third phase.
Pleased with his results, Farrell decided to take his development even further! He wanted to gain more muscle mass and take his body one step further. With that in mind, I decided he was ready for an advanced program that utilizes more advanced techniques using tried and tested methods and some of my own custom techniques. Building off his phase 3 training program I revamped his program that concentrated on those movements that his body best responded well to in addition to introducing new techniques such as my own custom methods (such as consecutive sets and 20 by 20 sets).
I introduced a carbohydrate cycling program for his nutrition program. I knew his body would require more fuel for his tougher workouts such as legs, back and shoulders so I introduced a nutrient manipulation program.
I added a new supplement into his program which helped with his energy and muscle performance.
At this stage, Farrell's training and nutrition programs were acting as one. They were so in sync with each other that no matter what he did he added muscle and burned more fat! I have to say, his results surprised me! When he sent me his photo updates he looked jacked! He looked like he was ready for a wrestling match! He looked 20 years younger – lean, muscular and healthy.
Take a look at his photos!
Farrell wasn't done there! He was bit by the body building bug and he needed to see if his body could go further! In my consultations with Farrell he now wanted to get bigger. He wanted to have thicker and fuller muscles. At this point I knew without a doubt that if we reversed his program and started using a higher calorie count with more starches his body would soak it all up and his muscles would completely fill out! His muscles would explode!
With that in mind I increased his calories to 2,500 per day and increased his carbohydrates by about 100 using special meals designed to boost muscle growth on those days his muscle would be most receptive. I also changed up his training routine and used a 5 day protocol but this time, I implemented a lower repetition range and started using compound supersets. I knew it would take about 2 to 3 weeks for his body to soak up all of the nutrients and his muscles to start filling out.
At the moment, we are going to be adding quality pounds to Farrell's physique to bring his weight back up to 170 pounds but this time around, this is going to be pure muscle mass! As you can see from his latest photos that Farrell is now putting on healthy muscle mass. I am 100% confident that by July he will be summer ready and ready to unveil a body of someone half his age. At 62 years young Farrell shows no sign of slowing down. 15 weeks ago he looked fragile. Now he looks muscular, powerful and in shape.
Farrell is absolute proof that regardless of your age a person can get strong, get lean and look (and feel) 20 years younger! I take pride in my online personal training program and each one of my clients gets my 30 plus years of experience in designing their systems.
"I have progressed more with Blake's program, than with any other. I enjoy the workouts and the nutrition is made easy. I hope to continue with the program and to get larger. I have gone from 22% body fat to 16%. After I gain some muscle back I hope to lose more body fat."
How Cory Miller (45 years old) lost 61 pounds, gained 65% more strength in less than 4 months!!
How Mike S gained 52% more Strength in 15 Weeks!
Are you tired of being overweight and out of shape?
Are you tired of having no energy?
Are you confused by all the conflicting information on the internet on how to lose weight, burn fat and build muscle?
Are you tired of going from one program to another which never really delivers the promised results?
Have you simply had enough and just want to start TODAY and get on the track to changing the way you look and feel?
Do you need an expert with over 30 years experience to develop your plan and guide you every step of the way until you reach your goals?
My unique "phased" process can work for anyone regardless of activity levels, age or gender. If you have the will and commitment to make positive change in how you look and feel than my unique programming will provide you with the plan and direction you need to succeed.
My unique programs are paid programs for a reason…They Work!
Complete personal training solutions (Like the one Farrell is using in the above example). This is a complete program including coaching and ongoing mentoring / guidance.
If you're reading this page I know you want to change the way you look and feel - You're here for a reason because you want to make a change! Take action today and start transforming your body!
Fill out the form below and I'll outline the type of program you need to reach your goals. If you're dead set on making a change and need direction, just fill out the form below and I'll outline the exacty type of program you need to reach your goals (and the price for the program type).
My programs are are also super affordable and some of the lowest cost custom training programs on the internet! Use my 30 years of direct experience and knowledge so you can get the body you've always wanted.
Reserve your spot today!! Fill out the form below and I will get back to you ASAP!!
After you hit submit I will get in contact with you to determine your next steps and provide more information!
This a risk free promise! If you're not satisfied after the first month I will refund your first installment! You have nothing to lose and everything to gain!


Welcome to the Northern Virginia chapter of Greyhound Pets of America (GPA-NoVA). We primarily serve the Washington DC metropolitan area, Northern Virginia and parts of Maryland. We are committed to adopting retired racing greyhounds into loving forever homes and educating the public about these wonderful companions.
If you'd like to learn more about greyhounds, please visit us at one of the many meet and greet events we hold every month. If you are ready to welcome a retired racing greyhound into your home, please visit our adoptions page.
We have answers to the most commonly asked questions on our Frequently Asked Questions (FAQ) page. If you still have questions, please reach out to us here and one of our volunteers will be in touch with you.
Our greatest strength are our volunteers. We have volunteers all over the Washington DC metro area, ready to help adopters, prospective adopters and the public with any queries or concerns. We are always looking for volunteers who with to donate their time and skills. If you'd like to volunteer, please visit our volunteering page to see what opportunities are available.


text:
Q: Javascript API to hide navigation breadcrumb and header Using Tableau Server 9.2. I am playing with the Javascript API to embed vizs in web pages. It works nicely except I want to hide the top part of the viz page, everything including and above the navigation breadcrumb part. The part circle in red is what I want to remove from the embedded viz. What options can be used to hide this part of the embedded viz?

Here is my html and js code to embed the viz.

A: For var url
Replace the current link with the link that is inside under share button .
Do not use the link under Embed , rather use the one below Email.
share button can be found when you open your viz. inside tableau .
Let me know if this works .

redpajama_set_name: RedPajamaStackExchange


text:
Climate change could increase volcano eruptions
School of Geography news Thursday 23 November 2017
Shrinking glacier cover could lead to increased volcanic activity in Iceland, warn scientists.
A new study, led by the University of Leeds, has found that there was less volcanic activity in Iceland when glacier cover was more extensive and as the glaciers melted volcanic eruptions increased due to subsequent changes in surface pressure.
Dr Graeme Swindles, from the School of Geography at Leeds, said: "Climate change caused by humans is creating rapid ice melt in volcanically active regions. In Iceland, this has put us on a path to more frequent volcanic eruptions."
The study examined Icelandic volcanic ash preserved in peat deposits and lake sediments and identified a period of significantly reduced volcanic activity between 5,500 and 4,500 years ago. This period came after a major decrease in global temperature, which caused glacier growth in Iceland.
The human effect on global warming makes it difficult to predict how long the time lag will be but the trends of the past show us more eruptions in Iceland can be expected in the future.
The findings, published today in the journal Geology, found there was a time lag of roughly 600 years between the climate event and a noticeable decrease in the number of volcanic eruptions. The study suggests that perhaps a similar time lag can be expected following the more recent shift to warmer temperatures.
Iceland's volcanic system is in process of recovering from the 'Little Ice Age' — a recorded period of colder climate roughly between the years 1500 to 1850. Since the end of the Little Ice Age, a combination of natural and human caused climate warming is causing Icelandic glaciers to melt again.
Dr Swindles said: "The human effect on global warming makes it difficult to predict how long the time lag will be but the trends of the past show us more eruptions in Iceland can be expected in the future.
"These long term consequences of human effect on the climate is why summits like COP are so important. It is vital to understand how actions today can impact future generations in ways that have not been fully realised, such as more ash clouds over Europe, more particles in the atmosphere and problems for aviation. "
Icelandic volcanism is controlled by complex interactions between rifts in continental plate boundaries, underground gas and magma build-up and pressure on the volcano's surface from glaciers and ice. Changes in surface pressure can alter the stress on shallow chambers where magma builds up.
Even small changes in surface pressure can alter the likelihood of eruptions at ice-covered volcanos
Study co-author, Dr Ivan Savov, from the School of Earth & Environment at Leeds, explains: "When glaciers retreat there is less pressure on the Earth's surface. This can increase the amount of mantle melt as well as affect magma flow and how much magma the crust can hold.
"Even small changes in surface pressure can alter the likelihood of eruptions at ice-covered volcanos."
The research paper, Climatic control on Icelandic volcanic activity during the mid?Holocene, was published in Geology 16 November 2017.
For additional information and to request interviews please contact Anna Harrison, Press Officer at the University of Leeds, on +44 (0)113 34 34196 or a.harrison(at)leeds.ac.uk
The University of Leeds is one of the largest higher education institutions in the UK, with more than 33,000 students from more than 150 different countries, and a member of the Russell Group of research-intensive universities.
We are a top ten university for research and impact power in the UK, according to the 2014 Research Excellence Framework, and are in the top 100 for academic reputation in the QS World University Rankings 2018. Additionally, the University was awarded a Gold rating by the Government's Teaching Excellence Framework in 2017, recognising its 'consistently outstanding' teaching and learning provision. Twenty-four of our academics have been awarded National Teaching Fellowships – more than any other institution in England, Northern Ireland and Wales – reflecting the excellence of our teaching. www.leeds.ac.uk
Natural Environment Research Council
NERC is the UK's main agency for funding and managing research, training and knowledge exchange in the environmental sciences. Our work covers the full range of atmospheric, Earth, biological, terrestrial and aquatic science, from the deep oceans to the upper atmosphere and from the poles to the equator. We co-ordinate some of the world's most exciting research projects, tackling major issues such as climate change, environmental influences on human health, the genetic make-up of life on Earth, and much more. NERC is a non-departmental public body. We receive around £330m of annual funding from the Department for Business, Energy & Industrial Strategy (BEIS).
See all School of Geography news
Using the past to unravel the future for Arctic wetlands
School of Geography - Wednesday 29 May 2019
Collaborative projects to advance understanding of biodiversity in Latin America
School of Geography - Tuesday 14 May 2019
SIPHER consortium to drive policy reform and tackle health inequalities announced
School of Geography - Thursday 9 May 2019


text:
Board of Professional Responsibility
of the Supreme Court of Tennessee
Consumer Assistance Program
Purpose of Discipline
Complaints and Inquiry
Hearings and Reviews
What Not To Expect
Lawyer Referral Services
Online Attorney Directory
Formal Ethics Opinions
Informal Ethics Inquiries
Attorney License Information
Rule 44 Intermediary Organizations
Pro Hac Vice Information
Pro Hac Vice Attorney Search
Board Notes Newsletter
Frequently Asked Ethics Questions
How to Handle Unidentified Funds in Your Trust Account
Informational Releases
All Document Search
Recent Disciplinary and Licensure Actions
Recent Supreme Court Opinions
The Board of Professional Responsibility will be closed on Monday, January 18, 2021 in observance of the Martin Luther King, Jr. holiday.
The Board of Professional Responsibility is operating remotely.
For informal ethics inquiries, please enter your inquiry online using the informal inquiry form. Ethics Counsel will be receiving informal ethics inquiries online only.
87-F-111 - Vicarious Disqualification of Entire Staff of District Attorney
BOARD OF PROFESSIONAL RESPONSIBILITY OF THE SUPREME COURT OF TENNESSEE
FORMAL ETHICS OPINION 87-F-111
Inquiry is made concerning the vicarious disqualification of the entire staff of a District Attorney General when one member of the staff is disqualified from handling a particular matter.
The Tennessee District Attorneys General Conference on behalf of all District Attorneys General and their Assistants has made an ethics inquiry concerning the vicarious disqualification of the entire staff of a District Attorney General when one member of the staff is disqualified.
In the case of State v. Phillips, 672 S.W.2d 427 (Tenn. Cr. App. 1984) the court reversed the defendants conviction and disqualified the District Attorney General from participating in the retrial after finding that the defendants former counsel had become an Assistant District Attorney and worked on the case for the prosecution.
While serving as Assistant District Attorney the former defense counsel assisted in trial preparation, reviewed the state's file, made notes in the file, assisted with discovery, prepared and filed motions, interviewed prospective witnesses and obtained an expert to refute the defense he had interposed for the defendant. In disqualifying the District Attorney General the court directed the trial judge to appoint a District Attorney pro tempore to represent the state on retrial, and further directed the trial judge to insure that the contents of the District Attorney General's file from the time defense counsel was employed was not available to the District Attorney pro tempore. In disqualifying the District Attorney General the Court stated:
The courts simply cannot countenance the desertion of the accused by his defense counsel, acceptance of employment with the prosecutor and any subsequent participation in any manner in the trial, including pre-trial preparation. It seems inconceivable that the challenged attorney and his new employer did not know that.
The court distinguished the facts in State v. Phillips from the facts in its previous ruling in Mattress v. State, 564 S.W.2d 678 (Tenn. Cr. App. 1977). In Mattress the court held that the trial court's action in disqualifying the challenged Assistant District Attorney from participating in the trial but allowing another assistant on the same staff to prosecute was adequate to dispel any appearance of impropriety. In Mattress the challenged Assistant District Attorney had formerly been a legal clinic staff attorney and accepted a case involving one of the defendants but had not interviewed the defendant. Another legal clinic file revealed that the challenged attorney had been assigned to defend Mattress. The challenged Assistant District Attorney did not recall the cases and did not recall talking with either of the defendants. Neither defendant claimed to have been interviewed by him nor to have divulged any confidential information to him. The former legal clinic attorney interviewed the state's witnesses and prepared a motion for continuance after becoming Assistant District Attorney. The court held that the defense counsel/prosecutors actions in the Mattress case did not approach the extensive pre-trial representation by the challenged attorney in State v. Phillips.
The court also cited and distinguished Autry v. State, 430 S.W.2d 808 (Tenn. Cr. App. 1967) as well as cases from Illinois, Oklahoma, Missouri, New Jersey, Florida, Kansas, Mississippi and West Virginia wherein convictions were reversed and remanded for new trial because defense counsel had switched sides.
The Supreme Court of Tennessee, in the case of State of Tennessee v. Jesse Jones, In Re: Larry S. Banks, Attorney 726 S.W.2d 515 struck down the Board's per se rule in Ethics Opinion 83-F-41 that county attorneys and their associates cannot represent criminal defendants prosecuted by county officers. The court found that each incident should be examined and determined on a case-by-case basis.
It appears that a per se rule in this instance is likewise inappropriate and that the question concerning the vicarious disqualification of the entire staff of a District Attorney General when one member of the staff is disqualified should be examined and determined by the court on a case-by-case basis.
This 16th day of September, 1987.
ETHICS COMMITTEE:
Michael E. Callaway
Charles T. Herndon III
G. Wilson Horde
APPROVED AND ADOPTED BY THE BOARD
Links of Interests
To assist the Court in protecting the public from harm from unethical lawyers by administering the disciplinary process; to assist the public by providing information about the judicial system and the disciplinary system for lawyers; and, to assist lawyers by interpreting and applying the Court's disciplinary rules.
© 2021 Board of Professional Responsibility of the Supreme Court of Tennessee.


Ever think that? But why not you? Why not think about all the things you're grateful for? Isn't that more empowering?
To always do the right thing? To put others first? To improve the situation, no matter what? Thank you for being you!


Do you read Paul Krugman's blog?
I don't think it is really confusing at all, because when you cut taxes there are two different effects. One is that you cut tax rates, and therefore give people incentives to do things like work and produce more and pay more — maybe, depending on what kind of taxes. And then you also maybe give people more income. This income effect is the one that's related to this Keynesian multiplier argument, where it's usually argued that government spending should have a bigger effect. So that's the income effect. But the tax-rate effect, inducing people to do things like work and produce more and invest more, is a whole separate effect, and that could easily be much bigger than the multiplier thing, than the income thing.
Oh it's exceptionally different. But the experiment is that the government is doing something by changing the tax system to lower its collections — by, for example, a tax cut. The response of the economy to that is not going just to isolate this business of giving people money. It's also going to have these incentive effects, more than tax rebates, on economic activity. It's going to be a combination of those two things — income effects and incentive effects. One piece looks like this sort of multiplier stuff, which is analogous to government spending — probably because the government spending has a first-round effect where it comes in and directly affects the aggregate demand — and then in the second round it sort of looks like a tax cut. That's why the government spending thing is bigger in textbooks: because it has this first round in addition to all these subsequent ones.
But all that is just income responses — people having more or less income, or the government keeping the money and then that shows up as people's income. None of that is about responses in terms of incentives — incentives changing in response to lower or higher tax rates. And the evidence that Romer and Romer look at is combining the tax rate stuff with the income stuff. I didn't know it was possible to do that but, hey, you get different viewpoints form different people. But the study I am doing now is intended to include all these things together in one framework.


text:
Q: iOS 9.2: Select List (multiple) incorrectly firing change event and setting value to first option on focus. (safari and chrome) I am having issues with a multi select list in iOS browsers (chrome and safari). In my case I have an angular model binding on the select which is firing watchers and updating the model value as soon as I focus on the select. I believe this is a bug in iOS 9.2. Here are the specific symptoms:
Chrome:
As soon as the select element is focused the "change" event is fired and the value is set to the first item, even though the UI shows no selections. After selecting a different option from the list and closing the iOS overlay, the value changes to the correct value. If you then focus on it again the "change" event is again fired and the value of the first option is again added. This time closing the overlay leaves the first item selected.
Safari:
As soon as the select element is focused the "change" event is fired and the value is set to the first item. In this case the UI in the overlay shows no selections, but the text in the original select now shows the first item as selected. Actually selecting the first time, sets the value to null even though the UI clearly shows you have now selected the first item. As you focus and blur the select it will continue to toggle the inclusion of the value of the first option in the list. Basically in addition to the incorrect addition of the first item to the value on focus, this browser also loses sync between the value and the UI.
I've created a very simplified jsfiddle to demonstrate this behavior.
http://jsfiddle.net/u922mnvv/4/
HTML
<select name="test" multiple>
  <option value="test1">test1</option>
  <option value="test2">test2</option>
  <option value="test3">test3</option>
  <option value="test4">test4</option>
  <option value="test5">test5</option>
  <option value="test6">test6</option>
</select>

  Log:

JS (just for logging the events and values)
$('select').change(function(event){
    $('div').append('
change:'+$('select').val()+'
');
});

Is this a known issue? Are there any work-arounds?

A: I had the same issue. This answer helped to resolve it:
The trick is to add a empty and disabled select option at the fist position:
<select multiple>
    <option disabled></option>

    <option value="test1">Test 1</option>
    <option value="test2">Test 2</option>
    <option value="test3">Test 3</option>
</select>

This will prevent iOS from automatically selecting the first option and keep the selection values right and clean!
The empty option is not visible and the count of the selections is correct.

A: <option disabled> is still selectable by the user, even if it doesn't start selected.
<optgroup> is a better solution:
<select multiple>
  <optgroup disabled hidden></optgroup>
  <option value="test1">test1</option>
  <option value="test2">test2</option>
  <option value="test3">test3</option>
  <option value="test4">test4</option>
</select>


text:
f Hygienic Behaviors and Risks for Ascariasis among College Students in Kabul, Afghanistan
Mohammad Yousuf Mubarak1, Abram L. Wagner2, Bradley F. Carlson2, Matthew L. Boulton2,3
Affiliations: 1 Department of Microbiology, Kabul Medical University, Kabul, Afghanistan; 2 Department of Epidemiology, University of Michigan, Ann Arbor, Michigan; 3 Department of Internal Medicine, University of Michigan, Ann Arbor, Michigan
*Address correspondence to Abram L. Wagner, Department of Epidemiology, University of Michigan, 1415 Washington Heights, Ann Arbor, MI 48109. E-mail: [email protected]
fn2Financial support: ALW's salary was funded through the PhRMA Foundation. This article and MYM's participation in the Afghanistan Biosciences Fellowship Program is sponsored by the U.S. government Cooperative Biological Engagement Program with support from CRDF Global. The content of the information does not necessarily reflect the position or the policy of the federal government, and no official endorsement should be inferred.
fn3Authors' addresses: Mohammad Yousuf Mubarak, Department of Microbiology, Kabul Medical University, Kabul, Afghanistan, E-mail: [email protected]. Abram L. Wagner, Bradley F. Carlson, and Matthew L. Boulton, Department of Epidemiology, University of Michigan, Ann Arbor, MI, E-mails: [email protected], [email protected], and [email protected].
Note: Supplemental appendix appears at www.ajtmh.org.
Source: The American Journal of Tropical Medicine and Hygiene, Volume 97, Issue 2, 2 Aug 2017, p. 563 - 566
Teenagers have a high prevalence of ascariasis in low-income countries with endemic disease, and their hygienic behaviors and access to proper sanitation may be limited in rapidly urbanizing settings. We studied university students in Kabul to estimate the proportion with ascariasis and determine the prevalence of risk factors for infection. Ascariasis was assessed through microscopy for 520 students attending Kabul Medical University. Overall, 15.8% of students were infected. Living in a hostel (21.2% versus 10.4% in houses) using well water (27.7% versus 9.7% for piped water), eating street food (29.4% versus 3.0% for those who do not), and eating unwashed vegetables (63.6% versus 8.8% for those who do not) were risk factors for infection. Recent city migrants who live in group hostels, including students, are important targets for interventions to reduce ascariasis. Such interventions could include encouraging individuals to prepare their own food and use only potable water.
Centers for Disease Control and Prevention, 2016. Parasites—Ascariasis. Available at: http://www.cdc.gov/parasites/ascariasis/index.html. Accessed September 29, 2016.
Pullan RL, Smith JL, Jasrasaria R, Brooker SJ, 2014. Global numbers of infection and disease burden of soil transmitted helminth infections in 2010. Parasit Vectors 7: 37.[Crossref]
Hall A, Anwar KS, Tomkins A, Rahman L, 1999. The distribution of Ascaris lumbricoides in human hosts: a study of 1765 people in Bangladesh. Trans R Soc Trop Med Hyg 93: 503–510.[Crossref]
Hall A, Hewitt G, Tuffrey V, De Silva N, 2008. A review and meta-analysis of the impact of intestinal worms on child growth and nutrition. Matern Child Nutr 4 (Suppl 1): 118–236.[Crossref]
Bethony J, Brooker S, Albonico M, Geiger SM, Loukas A, Diemert D, Hotez PJ, 2006. Soil-transmitted helminth infections: ascariasis, trichuriasis and hookworm. Lancet 367: 1521–1532.[Crossref]
United Nations High Commissioner for Refugees, 2015. UNHCR—Afghanistan. Available at: http://www.unhcr.org/pages/49e486eb6.html. Accessed November 12, 2015.
Varkey S, Higgins-Steele A, Mashal T, Hamid BA, Bhutta ZA, 2015. Afghanistan in transition: call for investment in nutrition. Lancet Glob Health 3: e13–e14.[Crossref]
United Nations Department of Economic and Social Affairs, 2014. Afghanistan. Available at: http://esa.un.org/unpd/wup/Country-Profiles/. Accessed October 15, 2015.
Marsden P, 2003. Afghanistan: the reconstruction process. Int Aff 79: 91–105.[Crossref]
Gabrielli AF, Ramsan M, Naumann C, Tsogzolmaa D, 2005. Soil-transmitted helminths and haemoglobin status among Afghan children in World Food Programme assisted schools. J Helminthol 79: 381–384.[Crossref]
Cairncross S, Blumenthal U, Kolsky P, Moraes L, Tayeh A, 1996. The public and domestic domains in the transmission of disease. Trop Med Int Health 1: 27–34.[Crossref]
Ranjan S, Passi SJ, Singh SN, 2013. Prevalence and risk factors associated with the presence of soil-transmitted helminths in children studying in Municipal Corporation of Delhi Schools of Delhi, India. J Parasit Dis 39: 377–384.[Crossref]
Nishiura H, Imai H, Nakao H, Tsukino H, 2002. Ascaris lumbricoides among children in rural communities in the northern area, Pakistan: prevalence, intensity, and associated socio-cultural and behavioral risk factors. Acta Trop 83: 223–231.[Crossref]
Traub RJ, Robertson ID, Irwin P, Mencke N, Thompson RCA, 2004. The prevalence, intensities and risk factors associated with geohelminth infection in tea-growing communities of Assam, India. Trop Med Int Health 9: 688–701.[Crossref]
GeoHive, 2016. Afghanistan: Administrative Units, Extended. Available at: http://www.geohive.com/cntry/afghanistan_ext.aspx. Accessed June 27, 2016.
Setchell CA, Luther CN, 2009. Kabul, Afghanistan: a case study in responding to urban displacement. Humanit Exch Mag 45: 33–36.
Mubarak MY, Wagner AL, Asami M, Carlson BF, Boulton ML, 2016. Hygienic practices and diarrheal illness among persons living in at-risk settings in Kabul, Afghanistan: a cross-sectional study. BMC Infect Dis 16: 459.[Crossref]
Tadesse G, 2005. The prevalence of intestinal helminthic infections and associated risk factors among school children in Babile town, eastern Ethiopia. Ethiop J Health Dev 19: 140–147.[Crossref]
Vollaard A, Ali S, van Asten HAGH, Ismid IS, Widjaja S, Visser LG, Surjadi C, van Dissel JT, 2004. Risk factors for transmission of foodborne illness in restaurants and street vendors in Jakarta, Indonesia. Epidemiol Infect 132: 863–872.[Crossref]
Periago MV, Diniz RC, Pinto SA, Yakovleva A, Correa- R, Diemert DJ, Bethony JM, 2015. The right tool for the job : detection of soil-transmitted helminths in areas co-endemic for other helminths. PLoS Negl Trop Dis 9: e0003967.[Crossref]
Hygienic Behaviors and Risks for Ascariasis among College Students in Kabul, Afghanistan
The American Journal of Tropical Medicine and Hygiene 97, 563 (2017); https://doi.org/10.4269/ajtmh.16-0968
Supplemental Table
Accepted : 13 Mar 2017
Published online : 08 May 2017


by Eustace de Saint Phalle, The Veen Firm, PC, © 2011 by the author.
You have prepared your case. You did your discovery. You figured out what plaintiff's experts were necessary. You thought long and hard about what was needed to prove your case and how much it was going to cost. You did the wise thing and hired all the experts you determined to be necessary. You provided these experts with all the discovery material for their review, made sure they were prepared and disclosed them timely. You spent the money and feel confident you did the right thing - then you get defendant's motion in limine, or at trial, requesting the court to limit the number of experts you may use. Do not despair, this usually means the other side is worried.
The court has the discretion to accept experts as offered by a party, or to limit them under Evidence Code section 723. However, courts will allow testimony from multiple witnesses where each expert testifies as to a different factual aspect of the case.
It is also asserted that the testimony of eight doctors was unnecessarily cumulative. The assertion is without merit. Each doctor called by the plaintiffs testified in substantial part to different aspects of the medical care that had been provided from the time of the accident to time of trial. That testimony, too, was highly relevant on the issue of damages.
Therefore, if plaintiff can demonstrate that the experts have different expertise, different opinions or address different factual issues, there should be no need to limit the number of experts presented at trial.
A court should limit an expert's testimony, rather than excluding the expert, but only if the court finds testimony to be cumulative. Defendants often cite to the case of Scalere v. Stenson (1989) 211 Cal.App.3d 1446, for the proposition that the court should limit the number of experts that a plaintiff is permitted to use to prevent cumulative testimony. In that case, the trial court prevented cumulative testimony, but did not exclude the expert who offered the cumulative testimony. Instead, the court asked the expert to testify as to any "area that hasn't been gone into." (Id. at 1454.) Thus, Scalere does not support a defendant's motion to limit the number of plaintiff's experts on a particular topic as is often asserted by defense counsel. Instead, Scalere points out that there is no need to exclude the experts themselves, as the court has the power to prevent cumulative testimony as that testimony arises during the proceedings.
Defendants called four experts who gave their opinions as to the movements plaintiff's body must have taken upon impact and uniformly concluded that she could not have struck the center area of the wheel. The trial court refused to allow defendants to introduce the same expert opinion evidence by a fifth expert, an employee of defendant General Motors. It is clear that this testimony was cumulative on the point.
that you have too many experts.
Demonstrating to the court the exact topics that each witness/expert will testify about and how the testimony is not cumulative or duplicative, but rather necessary for a proper understanding of the case should satisfy the court. As a fall back position, it is important to emphasize that the court has the ability to prevent any duplicative testimony while the witnesses are on the stand testifying in order to insure the proper presentation of the evidence. Thus, if the Court were to find that plaintiff's experts are offering testimony it considers cumulative, the Court has the power to instruct the expert to move on to another area, as the court did in Scalere.
A proper explanation of the facts and analysis of the law should provide ample justification for why you retained the experts and spent the money necessary to have them prepared to testify at trial. If the court understands what factual issues the experts will address and why their testimony is relevant and necessary for the proper presentation of your case, you should prevail. On the other hand, if you did not consider this thoroughly when you hired the expert and cannot explain it when you oppose defendant's motion, perhaps you should not have retained the expert in the first place -lesson learned.
Eustace de Saint Phalle is trial team leader of the Saint Phalle Trial Team at The Veen Firm, P.C. in San Francisco. He focuses his practice on civil litigation in a variety of areas, including industrial accidents, product liability, exceptions to workers' compensation, premises liability, auto accidents, maritime accidents, as well as business disputes and copyright violations. Mr. de Saint Phalle has been listed as a Northern California Super Lawyer since 2007 and is rated AV-Preeminent by Martindale-Hubbell for ethics and legal ability. He will provide additional materials for briefs or motions in limine upon request.


This stock photo of Tunisia, Chott el Jerid at sunset, Alamy Images number AC6YE4, is available for licensing through Alamy Images for commercial and editorial uses including websites, books, magazines, brochures and advertising. Restrictions may apply for images which contain third party copyrighted material or sensitive subjects. Photos of artwork are for editorial use only.


These super-sharp scissors cut everything from thread to bulky yarn… even cardboard… in one snip! A must for your project bag!
This mini-scissors measure 1.75″ long (excluding decoration). Available in a rainbow of colors and each features an adorable Nelson the Owl decoration!


I've been gone for a while. Sorry. It's been a busy time for me. I've spent most of the year coding a genomic analysis program called Opus 23 Pro.
Opus 23 Pro is a suite of apps that provide a development environment for precision medicine. It allows the clinician to import raw genomic data (such as provided by 23andMe and other services) and perform a series of extraordinarily sophisticated analytics upon it, culminating in a fully annotated and curated client report.
You can visit the developer blog I've put up by clicking here.
Mega-Data Mashups: Opus 23 Pro synthesizes its results from a wide variety of data, including GWAS (genome wide association study) data, dbSNP, Interactome, Etiome, PubMed, HapMap, and many others. SUPERMOGADON takes GWAS data and displays it as interactive Manhattan plots.
Complex Syndrome Modeling: Most complex syndromes are the result of genes acting in 'subgraphs' –specific neighborhoods in the network. MOBOCASTER supplies you with this data.


Age NI is the leading charity for older people in Northern Ireland. The charity was formed as the result of the merger between Age Concern and Help the Aged in 2009. Our vision is a world where everyone can love later life.
Our society is ageing. More than 350,000 older people live here today, and there are more people over the age of 50 than under the age of 19. In the next twenty years, the number of people over 50 will increase by more than 30%.
As we grow older we face new challenges, and may face difficult issues like illness, poverty or loneliness. We still want to laugh, love and be needed. We want to stay independent and keep doing the things we love. We all want a fulfilling later life. Age NI believes that living longer should be celebrated and that those who need help should be supported. We exist to support more people to love later life now and in the future. We want to make people think differently about what it means to get older, because age affects us all in different ways.
The charity provides a range of services across Northern Ireland including the Age NI Advice Service which deals with 10,000 enquiries every year; support for 11 sub regional older people's networks to increase the voice and sustainability of older people's groups at a local level; day, residential and domiciliary care to 1,200 clients every week in centres from Omagh to Castlewellan; policy and influencing activities to ensure that policy decisions made today will support more older people in Northern Ireland to love later life; a 1-2-1 service, First Connect, which supports older people who are in need of direct emotional and practical help in their lives at a time of crisis, perhaps through bereavement or illness; and products and services such as the Age NI personal Alarm, tailor made to support people over 50.
Share your views about nursing to enter a prize draw!
The State Retirement Pension has seen its most significant reform in two generations and is set to continue to see further changes.
Are you 60 + years old and would like to improve and review your driving skills or your knowledge to become a safer pedestrian?
The Commissioner for Older People for Northern Ireland has hit out at the suggestion that people over 75 could lose their free TV licence.
The catwalk is no longer the sole preserve of flawless young models. As Belfast Fashionweek launches today Lee Henry talks to three local people who are taking part in the event.
Join us for a very special interdenominational Christmas service in Armagh.
This service is one of our events for Playing Our Part appeal.
It will be recorded and then broadcast on BBC Radio Ulster on Sunday 13th December.
On November 6th, Avoneil Leisure Centre in east belfast hosts its Winter Warmer event and everyone's invited!
It's a winter planning event aimed at helping older people prepare for the forthcoming winter and there'll be a particular focus on the most vulnerable and isolated older people in the community.
The event is coordinated by community, voluntary and local government groups, who will 'man' stands at the event and be able to help you with lots of useful information and tips for the forthcoming difficult months.


The Nike Flyknit Elite Men's Golf Shoe provides a seamless, snug fit with lightweight support and an aggressive traction pattern for excellent grip on the course.
A Flyknit fabric upper hugs your foot for a snug, stretchy feel while an ankle cuff helps block out debris and reduce distractions. Flywire technology works with the laces to provide lightweight support through the midfoot.
A Lunarlon midsole provides lightweight, plush cushioning underfoot.
Nike Articulated Integrated Traction features a spikeless design and a three-part, flexible construction for aggressive traction that lets you move naturally through your swing.


text:
Q: E: Package 'gccxml' has no installation candidate
So, I am unable to find gccxml in ubuntu18,hep me download gccxml in ubuntu18. castxml is easily available. But I need gccxml. Also what is installation candidate? Thanks.

A: The GCC-XML home page says:

Note: GCC-XML has been succeeded by CastXML.

CastXML has been packaged for Ubuntu.  However, the replacement is based on the LLVM toolchain.
You could try to compile GCC-XML yourself, but since it was apparently based on GCC 4.2 (released in 2007), it is a dead end, especially for processing C++ sources.


Sound Capability: The hardware should be able to play sound through an internal speaker or to route stereo sound through a pair of external speakers connected to the computer.
Appropriate video capability. Most of the computers sold today have video capabilities that can accommodate multimedia.
Adequate storage. Because audio and video require large amounts of storage, extensive multimedia requires a storage device that plays disks that are substantially identical to that CDs that you buy in a music store.
The theory put across by Heckscher-Ohlin, states that international and inter-regional differences in production costs occur because of differences in the supply of production factors. Those goods that require a large amount of the abundant—thus less quantity—factor will have lower production costs, enabling them to be sold for less in international markets.
Successful organizations have sophisticated communications equipment that will make it possible to adapt quickly to ever changing wants and needs. It is impossible to overemphasize the importance of information management in today's organizations. Today 35 percent of all personal computers sold are laptop models that are more powerful than most business computers. Now these portable computers are being linked fax machines and cellular phones to send messages to anyone, anywhere, any time. Successful organizations emphasize the need for managing information flows between businesses and their employees, businesses and their customers, and so on.
Whether or not it is so recognized, pricing is one of the most crucial decision functions of a marketing manager. Pricing is an art, a game played for high stakes; for marketing strategists, it is the moment of truth. All of marketing comes to focus in the pricing decision. To a large extent, pricing decisions determine the types of customers and competitors an organization will attract. Likewise, a single pricing error can effectively nullify all other marketing-mix activities. Despite its importance, price rarely serves as the focus of marketing strategy, in part because it is the easiest marketing-mix activity for the competition to imitate.
It can be easily demonstrated that price is a direct determinant of profit (or loss). This fact is apparent from the fundamental relationship.
Revenue is a direct result of unit price times quantity sold, and costs are indirectly influenced by quantity sold, which in turn is partially dependent on unit price. Hence, price simultaneously influences both revenues and costs.
Despite its importance, pricing remains on of the least understood marketing-mix activities.


Moog Music has announced it is shipping the Sub 37 Bob Moog Tribute edition, a limited edition analog synthesizer featuring a Bob Moog signature panel, wood sides, and aluminum extrusion.
The Sub 37 Tribute Edition is a limited edition (2-note) paraphonic analog synthesizer built on the award winning Sub Phatty sound engine. Its panel features 40 knobs, 74 switches, and has a dedicated LCD display – placing each critical sound creation element and live performance tool quickly at your command.
Perform in Monophonic or Duo-Paraphonic modes.
37-note velocity sensitive keyboard w/ aftertouch.
2 modulation busses w/ assignable source and destinations.
DAHDSR (Delay, Attack, Hold, Decay, Sustain, Release) looping envelopes with sync.
256 Presets -16 banks of 16 patches.
Syncable Arpeggiator and Step Sequencer.
For every Sub 37 Tribute sold, Moog Music will donate a portion of the proceeds to Asheville Area School Music Programs.